Skip to content

update for the new exporter version #109

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions get_webstat_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,11 @@ async def main():
node_mainnet_count = 0

for family in text_string_to_metric_families(requests.get(args.url_main).content.decode('utf-8')):
if family.name == 'neofs_net_monitor_epoch':
if family.name == 'neo_exporter_epoch':
output['network_epoch']['mainnet'] = family.samples[0].value
if family.name == 'neofs_net_monitor_containers_number':
if family.name == 'neo_exporter_containers_number':
output['containers']['mainnet'] = family.samples[0].value
if family.name == 'neofs_net_monitor_netmap':
if family.name == 'neo_exporter_netmap':
for sample in family.samples:
node_mainnet_count += sample.value
sample.labels['nodes']=[{'net': 'main', 'value': sample.value }]
Expand All @@ -175,11 +175,11 @@ async def main():
node_testnet_count = 0

for family in text_string_to_metric_families(requests.get(args.url_test).content.decode('utf-8')):
if family.name == 'neofs_net_monitor_epoch':
if family.name == 'neo_exporter_epoch':
output['network_epoch']['testnet'] = family.samples[0].value
if family.name == 'neofs_net_monitor_containers_number':
if family.name == 'neo_exporter_containers_number':
output['containers']['testnet'] = family.samples[0].value
if family.name == 'neofs_net_monitor_netmap':
if family.name == 'neo_exporter_netmap':
for sample in family.samples:
node_testnet_count += sample.value
sample.labels['nodes']=[{'net': 'test', 'value': sample.value }]
Expand Down
Loading