Commit 6fd5e680 authored by Matthias Cramer's avatar Matthias Cramer
Browse files

... did not work ...

parent 73d88711
......@@ -5,8 +5,14 @@ import os
import json
import time
g={}
b={}
g = {}
b = {}
b["bgp-peer-pfxRcd"] = Gauge('frr_bgp_peer_pfxRcd', 'BGP Peer Prefixes Received', ['addrfam','peerip','asnum'])
b["bgp-peer-state"] = Enum('frr_bgp_peer_state', 'BGP Peer State', ['addrfam','peerip','asnum'], states=['Established', 'Connect', 'Active', 'OpenSent', 'Idle (Admin)'])
b["bgp-peer-msgRcvd"] = Gauge('frr_bgp_peer_msgRcvd', 'BGP Peer Messages Received', ['addrfam','peerip','asnum'])
b["bgp-peer-msgSent"] = Gauge('frr_bgp_peer_msgSent', 'BGP Peer Messages Sent', ['addrfam','peerip','asnum'])
b["bgp-peer-peerUptime"] = Gauge('frr_bgp_peer_peerUptime', 'BGP Peer Uptime', ['addrfam','peerip','asnum'])
g["v4-invalid"] = Gauge('frr_rpki_invalid_v4_count', "Count of RPKI Invalid IPv4 Prefixes")
g["v6-invalid"] = Gauge('frr_rpki_invalid_v6_count', "Count of RPKI Invalid IPv6 Prefixes")
......@@ -31,12 +37,6 @@ def getBGP():
cmd = 'show bgp summary json'
print("Running: %s" % (cmd))
bgpsum = json.loads(os.popen("vtysh -c \"" + cmd + "\"").read())
b["bgp-peer-pfxRcd"] = Gauge('frr_bgp_peer_pfxRcd', 'BGP Peer Prefixes Received', ['addrfam','peerip','asnum'])
b["bgp-peer-state"] = Enum('frr_bgp_peer_state', 'BGP Peer State', ['addrfam','peerip','asnum'], states=['Established', 'Connect', 'Active', 'OpenSent'])
b["bgp-peer-msgRcvd"] = Gauge('frr_bgp_peer_msgRcvd', 'BGP Peer Messages Received', ['addrfam','peerip','asnum'])
b["bgp-peer-msgSent"] = Gauge('frr_bgp_peer_msgSent', 'BGP Peer Messages Sent', ['addrfam','peerip','asnum'])
b["bgp-peer-peerUptime"] = Gauge('frr_bgp_peer_peerUptime', 'BGP Peer Uptime', ['addrfam','peerip','asnum'])
for af in bgpsum:
print("Running in Address Family: %s" % (af))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment