Skip to content

Commit

Permalink
BGP labels (->#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
akpw committed Mar 10, 2024
1 parent 412b6f3 commit eff2d2b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mktxp/collector/bgp_collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@ def collect(router_entry):
if value:
bgp_record[translated_field] = BGPCollector._translated_values(translated_field, value)

session_id_labes = ['name', 'remote_address', 'remote_as', 'local_as', 'remote_afi', 'local_afi']
bgp_sessions_metrics = BaseCollector.info_collector('bgp_sessions_info', 'BGP sessions info', bgp_records, session_id_labes)
session_info_labes = ['name', 'remote_address', 'remote_as', 'local_as', 'remote_afi', 'local_afi']
bgp_sessions_metrics = BaseCollector.info_collector('bgp_sessions_info', 'BGP sessions info', bgp_records, session_info_labes)
yield bgp_sessions_metrics

session_id_labes = ['name']
remote_messages_metrics = BaseCollector.counter_collector('bgp_remote_messages', 'Number of remote messages', bgp_records, 'remote_messages', session_id_labes)
yield remote_messages_metrics

Expand Down

0 comments on commit eff2d2b

Please sign in to comment.