Skip to content

Commit

Permalink
Merge pull request #109 from nspcc-dev/neofs_net_monitor-neo_exporter
Browse files Browse the repository at this point in the history
update for the new exporter version
  • Loading branch information
532910 authored Jun 19, 2024
2 parents 6db0e40 + 955c676 commit 544e4b2
Showing 1 changed file with 6 additions and 6 deletions.
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

0 comments on commit 544e4b2

Please sign in to comment.