diff --git a/README.md b/README.md index 98a265d..7845b62 100644 --- a/README.md +++ b/README.md @@ -21,43 +21,43 @@ make qtest | **Metric** | **Description** | **Labels** | | ------ | ------- | ------ | -`gobgp_router_up` | Is GoBGP up and responds to queries (1) or is it down (0). | | -`gobgp_router_id` | What is GoBGP router ID. | | -`gobgp_router_asn` | What is GoBGP AS number. | | -`gobgp_router_failed_req_count` | The number of failed requests to GoBGP router. | | -`gobgp_router_next_poll` | The timestamp of the next potential scrape of the router. | | -`gobgp_router_scrape_time` | The amount of time it took to scrape the router. | | -`gobgp_route_total_destination_count` | The number of routes on per address family and route table basis | `address_family`, `route_table` | -`gobgp_route_total_path_count` | The number of available paths to destinations on per address family and route table basis | `address_family`, `route_table` | -`gobgp_route_accepted_path_count` | The number of accepted paths to destinations on per address family and route table basis | `address_family`, `route_table` | -`gobgp_peer_count` | The number of BGP peers | | -`gobgp_peer_up` | Is the peer up and in established state (1) or it is not (0). | `name` | -`gobgp_peer_asn` | What is the AS number of the peer | `name` | -`gobgp_peer_local_asn` | What is the AS number presented to the peer by this router. | `name` | -`gobgp_peer_admin_state` | Is the peer configured for being Up (0), Down (1), or PFX_CT (2) | `name` | -`gobgp_peer_session_state` | What is the state of BGP session to the peer - unknown (0), idle (1), connect (2), active (3), opensent (4), openconfirm (5), established (6) | `name` | -`gobgp_peer_received_message_total_count` | The total number of messages the BGP peer sent to this router (limited to IPv4). | `name` | -`gobgp_peer_received_notification_message_count` | How many Notification messages did the BGP peer sent to this router (limited to IPv4). | `name` | -`gobgp_peer_received_update_message_count` | How many Update messages did the BGP peer sent to this router (limited to IPv4). | `name` | -`gobgp_peer_received_open_message_count` | How many Open messages did the BGP peer sent to this router (limited to IPv4). | `name` | -`gobgp_peer_received_keepalive_message_count` | How many messages did the BGP peer sent to this router (limited to IPv4). | `name` | -`gobgp_peer_received_refresh_message_count` | How many Refresh messages did the BGP peer sent to this router (limited to IPv4). | `name` | -`gobgp_peer_received_withdraw_update_message_count` | How many WithdrawUpdate messages did the BGP peer sent to this router (limited to IPv4). | `name` | -`gobgp_peer_received_withdraw_prefix_message_count` | How many messages did the BGP peer sent to this router (limited to IPv4). | `name` | -`gobgp_peer_sent_message_total_count` | The total number of messages this router sent to this BGP peer (limited to IPv4). | `name` | -`gobgp_peer_sent_notification_message_count` | How many Notification messages did this router sent to this BGP peer (limited to IPv4). | `name` | -`gobgp_peer_sent_update_message_count` | How many Update messages did this router sent to this BGP peer (limited to IPv4). | `name` | -`gobgp_peer_sent_open_message_count` | How many Open messages did this router sent to this BGP peer (limited to IPv4). | `name` | -`gobgp_peer_sent_keepalive_message_count` | How many messages did this router sent to this BGP peer (limited to IPv4). | `name` | -`gobgp_peer_sent_refresh_message_count` | How many Refresh messages did this router sent to this BGP peer (limited to IPv4). | `name` | -`gobgp_peer_sent_withdraw_update_message_count` | How many WithdrawUpdate messages did this router sent to this BGP peer (limited to IPv4). | `name` | -`gobgp_peer_sent_withdraw_prefix_message_count` | How many messages did this router sent to this BGP peer (limited to IPv4). | `name` | -`gobgp_peer_out_queue_count` | PeerState.OutQ | `name` | -`gobgp_peer_flop_count` | PeerState.Flops | `name` | -`gobgp_peer_send_community` | PeerState.SendCommunity | `name` | -`gobgp_peer_remove_private_as` | PeerState.RemovePrivateAs | `name` | -`gobgp_peer_password_set` | Whether the GoBGP peer has been configured (1) for authentication or not (0) | `name` | -`gobgp_peer_type` | PeerState.PeerType | `name` | +| `gobgp_router_up` | Is GoBGP up and responds to queries (1) or is it down (0). | | +| `gobgp_router_id` | What is GoBGP router ID. | | +| `gobgp_router_asn` | What is GoBGP AS number. | | +| `gobgp_router_failed_req_count` | The number of failed requests to GoBGP router. | | +| `gobgp_router_next_poll` | The timestamp of the next potential scrape of the router. | | +| `gobgp_router_scrape_time` | The amount of time it took to scrape the router. | | +| `gobgp_route_total_destination_count` | The number of routes on per address family and route table basis | `address_family`, `route_table`, `vrf_name` | +| `gobgp_route_total_path_count` | The number of available paths to destinations on per address family and route table basis | `address_family`, `route_table`, `vrf_name` | +| `gobgp_route_accepted_path_count` | The number of accepted paths to destinations on per address family and route table basis | `address_family`, `route_table`, `vrf_name` | +| `gobgp_peer_count` | The number of BGP peers | | +| `gobgp_peer_up` | Is the peer up and in established state (1) or it is not (0). | `name` | +| `gobgp_peer_asn` | What is the AS number of the peer | `name` | +| `gobgp_peer_local_asn` | What is the AS number presented to the peer by this router. | `name` | +| `gobgp_peer_admin_state` | Is the peer configured for being Up (0), Down (1), or PFX_CT (2) | `name` | +| `gobgp_peer_session_state` | What is the state of BGP session to the peer - unknown (0), idle (1), connect (2), active (3), opensent (4), openconfirm (5), established (6) | `name` | +| `gobgp_peer_received_message_total_count` | The total number of messages the BGP peer sent to this router (limited to IPv4). | `name` | +| `gobgp_peer_received_notification_message_count` | How many Notification messages did the BGP peer sent to this router (limited to IPv4). | `name` | +| `gobgp_peer_received_update_message_count` | How many Update messages did the BGP peer sent to this router (limited to IPv4). | `name` | +| `gobgp_peer_received_open_message_count` | How many Open messages did the BGP peer sent to this router (limited to IPv4). | `name` | +| `gobgp_peer_received_keepalive_message_count` | How many messages did the BGP peer sent to this router (limited to IPv4). | `name` | +| `gobgp_peer_received_refresh_message_count` | How many Refresh messages did the BGP peer sent to this router (limited to IPv4). | `name` | +| `gobgp_peer_received_withdraw_update_message_count` | How many WithdrawUpdate messages did the BGP peer sent to this router (limited to IPv4). | `name` | +| `gobgp_peer_received_withdraw_prefix_message_count` | How many messages did the BGP peer sent to this router (limited to IPv4). | `name` | +| `gobgp_peer_sent_message_total_count` | The total number of messages this router sent to this BGP peer (limited to IPv4). | `name` | +| `gobgp_peer_sent_notification_message_count` | How many Notification messages did this router sent to this BGP peer (limited to IPv4). | `name` | +| `gobgp_peer_sent_update_message_count` | How many Update messages did this router sent to this BGP peer (limited to IPv4). | `name` | +| `gobgp_peer_sent_open_message_count` | How many Open messages did this router sent to this BGP peer (limited to IPv4). | `name` | +| `gobgp_peer_sent_keepalive_message_count` | How many messages did this router sent to this BGP peer (limited to IPv4). | `name` | +| `gobgp_peer_sent_refresh_message_count` | How many Refresh messages did this router sent to this BGP peer (limited to IPv4). | `name` | +| `gobgp_peer_sent_withdraw_update_message_count` | How many WithdrawUpdate messages did this router sent to this BGP peer (limited to IPv4). | `name` | +| `gobgp_peer_sent_withdraw_prefix_message_count` | How many messages did this router sent to this BGP peer (limited to IPv4). | `name` | +| `gobgp_peer_out_queue_count` | PeerState.OutQ | `name` | +| `gobgp_peer_flop_count` | PeerState.Flops | `name` | +| `gobgp_peer_send_community` | PeerState.SendCommunity | `name` | +| `gobgp_peer_remove_private_as` | PeerState.RemovePrivateAs | `name` | +| `gobgp_peer_password_set` | Whether the GoBGP peer has been configured (1) for authentication or not (0) | `name` | +| `gobgp_peer_type` | PeerState.PeerType | `name` | For example: @@ -137,7 +137,7 @@ gobgp_peer_sent_withdraw_prefix_message_count{name="10.0.2.100"} 0 # HELP gobgp_peer_sent_withdraw_update_message_count How many WithdrawUpdate messages did this router sent to this BGP peer (limited to IPv4). # TYPE gobgp_peer_sent_withdraw_update_message_count gauge gobgp_peer_sent_withdraw_update_message_count{name="10.0.2.100"} 0 -# HELP gobgp_peer_session_state What is the state of BGP session to the peer: unknown (0), idle (1), connect (2), active (3), opensent (4), openconfirm (5), established (6) +# HELP gobgp_peer_session_state What is the state of BGP session to the peer - unknown (0), idle (1), connect (2), active (3), opensent (4), openconfirm (5), established (6) # TYPE gobgp_peer_session_state gauge gobgp_peer_session_state{name="10.0.2.100"} 3 # HELP gobgp_peer_type PeerState.PeerType @@ -148,94 +148,94 @@ gobgp_peer_type{name="10.0.2.100"} 0 gobgp_peer_up{name="10.0.2.100"} 0 # HELP gobgp_route_accepted_path_count The number of accepted paths to destinations on per address family and route table basis # TYPE gobgp_route_accepted_path_count gauge -gobgp_route_accepted_path_count{address_family="evpn",route_table="global"} 0 -gobgp_route_accepted_path_count{address_family="evpn",route_table="local"} 0 -gobgp_route_accepted_path_count{address_family="ipv4",route_table="global"} 0 -gobgp_route_accepted_path_count{address_family="ipv4",route_table="local"} 0 -gobgp_route_accepted_path_count{address_family="ipv4_encap",route_table="global"} 0 -gobgp_route_accepted_path_count{address_family="ipv4_encap",route_table="local"} 0 -gobgp_route_accepted_path_count{address_family="ipv4_flowspec",route_table="global"} 0 -gobgp_route_accepted_path_count{address_family="ipv4_flowspec",route_table="local"} 0 -gobgp_route_accepted_path_count{address_family="ipv4_mpls",route_table="global"} 0 -gobgp_route_accepted_path_count{address_family="ipv4_mpls",route_table="local"} 0 -gobgp_route_accepted_path_count{address_family="ipv4_vpn",route_table="global"} 0 -gobgp_route_accepted_path_count{address_family="ipv4_vpn",route_table="local"} 0 -gobgp_route_accepted_path_count{address_family="ipv4_vpn_flowspec",route_table="global"} 0 -gobgp_route_accepted_path_count{address_family="ipv4_vpn_flowspec",route_table="local"} 0 -gobgp_route_accepted_path_count{address_family="ipv6",route_table="global"} 0 -gobgp_route_accepted_path_count{address_family="ipv6",route_table="local"} 0 -gobgp_route_accepted_path_count{address_family="ipv6_encap",route_table="global"} 0 -gobgp_route_accepted_path_count{address_family="ipv6_encap",route_table="local"} 0 -gobgp_route_accepted_path_count{address_family="ipv6_flowspec",route_table="global"} 0 -gobgp_route_accepted_path_count{address_family="ipv6_flowspec",route_table="local"} 0 -gobgp_route_accepted_path_count{address_family="ipv6_mpls",route_table="global"} 0 -gobgp_route_accepted_path_count{address_family="ipv6_mpls",route_table="local"} 0 -gobgp_route_accepted_path_count{address_family="ipv6_vpn",route_table="global"} 0 -gobgp_route_accepted_path_count{address_family="ipv6_vpn",route_table="local"} 0 -gobgp_route_accepted_path_count{address_family="ipv6_vpn_flowspec",route_table="global"} 0 -gobgp_route_accepted_path_count{address_family="ipv6_vpn_flowspec",route_table="local"} 0 -gobgp_route_accepted_path_count{address_family="l2_vpn_flowspec",route_table="global"} 0 -gobgp_route_accepted_path_count{address_family="l2_vpn_flowspec",route_table="local"} 0 +gobgp_route_accepted_path_count{address_family="evpn",route_table="global",vrf_name="default"} 0 +gobgp_route_accepted_path_count{address_family="evpn",route_table="local",vrf_name="default"} 0 +gobgp_route_accepted_path_count{address_family="ipv4",route_table="global",vrf_name="default"} 0 +gobgp_route_accepted_path_count{address_family="ipv4",route_table="local",vrf_name="default"} 0 +gobgp_route_accepted_path_count{address_family="ipv4_encap",route_table="global",vrf_name="default"} 0 +gobgp_route_accepted_path_count{address_family="ipv4_encap",route_table="local",vrf_name="default"} 0 +gobgp_route_accepted_path_count{address_family="ipv4_flowspec",route_table="global",vrf_name="default"} 0 +gobgp_route_accepted_path_count{address_family="ipv4_flowspec",route_table="local",vrf_name="default"} 0 +gobgp_route_accepted_path_count{address_family="ipv4_mpls",route_table="global",vrf_name="default"} 0 +gobgp_route_accepted_path_count{address_family="ipv4_mpls",route_table="local",vrf_name="default"} 0 +gobgp_route_accepted_path_count{address_family="ipv4_vpn",route_table="global",vrf_name="default"} 0 +gobgp_route_accepted_path_count{address_family="ipv4_vpn",route_table="local",vrf_name="default"} 0 +gobgp_route_accepted_path_count{address_family="ipv4_vpn_flowspec",route_table="global",vrf_name="default"} 0 +gobgp_route_accepted_path_count{address_family="ipv4_vpn_flowspec",route_table="local",vrf_name="default"} 0 +gobgp_route_accepted_path_count{address_family="ipv6",route_table="global",vrf_name="default"} 0 +gobgp_route_accepted_path_count{address_family="ipv6",route_table="local",vrf_name="default"} 0 +gobgp_route_accepted_path_count{address_family="ipv6_encap",route_table="global",vrf_name="default"} 0 +gobgp_route_accepted_path_count{address_family="ipv6_encap",route_table="local",vrf_name="default"} 0 +gobgp_route_accepted_path_count{address_family="ipv6_flowspec",route_table="global",vrf_name="default"} 0 +gobgp_route_accepted_path_count{address_family="ipv6_flowspec",route_table="local",vrf_name="default"} 0 +gobgp_route_accepted_path_count{address_family="ipv6_mpls",route_table="global",vrf_name="default"} 0 +gobgp_route_accepted_path_count{address_family="ipv6_mpls",route_table="local",vrf_name="default"} 0 +gobgp_route_accepted_path_count{address_family="ipv6_vpn",route_table="global",vrf_name="default"} 0 +gobgp_route_accepted_path_count{address_family="ipv6_vpn",route_table="local",vrf_name="default"} 0 +gobgp_route_accepted_path_count{address_family="ipv6_vpn_flowspec",route_table="global",vrf_name="default"} 0 +gobgp_route_accepted_path_count{address_family="ipv6_vpn_flowspec",route_table="local",vrf_name="default"} 0 +gobgp_route_accepted_path_count{address_family="l2_vpn_flowspec",route_table="global",vrf_name="default"} 0 +gobgp_route_accepted_path_count{address_family="l2_vpn_flowspec",route_table="local",vrf_name="default"} 0 # HELP gobgp_route_total_destination_count The number of routes on per address family and route table basis # TYPE gobgp_route_total_destination_count gauge -gobgp_route_total_destination_count{address_family="evpn",route_table="global"} 0 -gobgp_route_total_destination_count{address_family="evpn",route_table="local"} 0 -gobgp_route_total_destination_count{address_family="ipv4",route_table="global"} 3 -gobgp_route_total_destination_count{address_family="ipv4",route_table="local"} 3 -gobgp_route_total_destination_count{address_family="ipv4_encap",route_table="global"} 0 -gobgp_route_total_destination_count{address_family="ipv4_encap",route_table="local"} 0 -gobgp_route_total_destination_count{address_family="ipv4_flowspec",route_table="global"} 0 -gobgp_route_total_destination_count{address_family="ipv4_flowspec",route_table="local"} 0 -gobgp_route_total_destination_count{address_family="ipv4_mpls",route_table="global"} 0 -gobgp_route_total_destination_count{address_family="ipv4_mpls",route_table="local"} 0 -gobgp_route_total_destination_count{address_family="ipv4_vpn",route_table="global"} 0 -gobgp_route_total_destination_count{address_family="ipv4_vpn",route_table="local"} 0 -gobgp_route_total_destination_count{address_family="ipv4_vpn_flowspec",route_table="global"} 0 -gobgp_route_total_destination_count{address_family="ipv4_vpn_flowspec",route_table="local"} 0 -gobgp_route_total_destination_count{address_family="ipv6",route_table="global"} 0 -gobgp_route_total_destination_count{address_family="ipv6",route_table="local"} 0 -gobgp_route_total_destination_count{address_family="ipv6_encap",route_table="global"} 0 -gobgp_route_total_destination_count{address_family="ipv6_encap",route_table="local"} 0 -gobgp_route_total_destination_count{address_family="ipv6_flowspec",route_table="global"} 0 -gobgp_route_total_destination_count{address_family="ipv6_flowspec",route_table="local"} 0 -gobgp_route_total_destination_count{address_family="ipv6_mpls",route_table="global"} 0 -gobgp_route_total_destination_count{address_family="ipv6_mpls",route_table="local"} 0 -gobgp_route_total_destination_count{address_family="ipv6_vpn",route_table="global"} 0 -gobgp_route_total_destination_count{address_family="ipv6_vpn",route_table="local"} 0 -gobgp_route_total_destination_count{address_family="ipv6_vpn_flowspec",route_table="global"} 0 -gobgp_route_total_destination_count{address_family="ipv6_vpn_flowspec",route_table="local"} 0 -gobgp_route_total_destination_count{address_family="l2_vpn_flowspec",route_table="global"} 0 -gobgp_route_total_destination_count{address_family="l2_vpn_flowspec",route_table="local"} 0 +gobgp_route_total_destination_count{address_family="evpn",route_table="global",vrf_name="default"} 0 +gobgp_route_total_destination_count{address_family="evpn",route_table="local",vrf_name="default"} 0 +gobgp_route_total_destination_count{address_family="ipv4",route_table="global",vrf_name="default"} 3 +gobgp_route_total_destination_count{address_family="ipv4",route_table="local",vrf_name="default"} 3 +gobgp_route_total_destination_count{address_family="ipv4_encap",route_table="global",vrf_name="default"} 0 +gobgp_route_total_destination_count{address_family="ipv4_encap",route_table="local",vrf_name="default"} 0 +gobgp_route_total_destination_count{address_family="ipv4_flowspec",route_table="global",vrf_name="default"} 0 +gobgp_route_total_destination_count{address_family="ipv4_flowspec",route_table="local",vrf_name="default"} 0 +gobgp_route_total_destination_count{address_family="ipv4_mpls",route_table="global",vrf_name="default"} 0 +gobgp_route_total_destination_count{address_family="ipv4_mpls",route_table="local",vrf_name="default"} 0 +gobgp_route_total_destination_count{address_family="ipv4_vpn",route_table="global",vrf_name="default"} 0 +gobgp_route_total_destination_count{address_family="ipv4_vpn",route_table="local",vrf_name="default"} 0 +gobgp_route_total_destination_count{address_family="ipv4_vpn_flowspec",route_table="global",vrf_name="default"} 0 +gobgp_route_total_destination_count{address_family="ipv4_vpn_flowspec",route_table="local",vrf_name="default"} 0 +gobgp_route_total_destination_count{address_family="ipv6",route_table="global",vrf_name="default"} 0 +gobgp_route_total_destination_count{address_family="ipv6",route_table="local",vrf_name="default"} 0 +gobgp_route_total_destination_count{address_family="ipv6_encap",route_table="global",vrf_name="default"} 0 +gobgp_route_total_destination_count{address_family="ipv6_encap",route_table="local",vrf_name="default"} 0 +gobgp_route_total_destination_count{address_family="ipv6_flowspec",route_table="global",vrf_name="default"} 0 +gobgp_route_total_destination_count{address_family="ipv6_flowspec",route_table="local",vrf_name="default"} 0 +gobgp_route_total_destination_count{address_family="ipv6_mpls",route_table="global",vrf_name="default"} 0 +gobgp_route_total_destination_count{address_family="ipv6_mpls",route_table="local",vrf_name="default"} 0 +gobgp_route_total_destination_count{address_family="ipv6_vpn",route_table="global",vrf_name="default"} 0 +gobgp_route_total_destination_count{address_family="ipv6_vpn",route_table="local",vrf_name="default"} 0 +gobgp_route_total_destination_count{address_family="ipv6_vpn_flowspec",route_table="global",vrf_name="default"} 0 +gobgp_route_total_destination_count{address_family="ipv6_vpn_flowspec",route_table="local",vrf_name="default"} 0 +gobgp_route_total_destination_count{address_family="l2_vpn_flowspec",route_table="global",vrf_name="default"} 0 +gobgp_route_total_destination_count{address_family="l2_vpn_flowspec",route_table="local",vrf_name="default"} 0 # HELP gobgp_route_total_path_count The number of available paths to destinations on per address family and route table basis # TYPE gobgp_route_total_path_count gauge -gobgp_route_total_path_count{address_family="evpn",route_table="global"} 0 -gobgp_route_total_path_count{address_family="evpn",route_table="local"} 0 -gobgp_route_total_path_count{address_family="ipv4",route_table="global"} 3 -gobgp_route_total_path_count{address_family="ipv4",route_table="local"} 3 -gobgp_route_total_path_count{address_family="ipv4_encap",route_table="global"} 0 -gobgp_route_total_path_count{address_family="ipv4_encap",route_table="local"} 0 -gobgp_route_total_path_count{address_family="ipv4_flowspec",route_table="global"} 0 -gobgp_route_total_path_count{address_family="ipv4_flowspec",route_table="local"} 0 -gobgp_route_total_path_count{address_family="ipv4_mpls",route_table="global"} 0 -gobgp_route_total_path_count{address_family="ipv4_mpls",route_table="local"} 0 -gobgp_route_total_path_count{address_family="ipv4_vpn",route_table="global"} 0 -gobgp_route_total_path_count{address_family="ipv4_vpn",route_table="local"} 0 -gobgp_route_total_path_count{address_family="ipv4_vpn_flowspec",route_table="global"} 0 -gobgp_route_total_path_count{address_family="ipv4_vpn_flowspec",route_table="local"} 0 -gobgp_route_total_path_count{address_family="ipv6",route_table="global"} 0 -gobgp_route_total_path_count{address_family="ipv6",route_table="local"} 0 -gobgp_route_total_path_count{address_family="ipv6_encap",route_table="global"} 0 -gobgp_route_total_path_count{address_family="ipv6_encap",route_table="local"} 0 -gobgp_route_total_path_count{address_family="ipv6_flowspec",route_table="global"} 0 -gobgp_route_total_path_count{address_family="ipv6_flowspec",route_table="local"} 0 -gobgp_route_total_path_count{address_family="ipv6_mpls",route_table="global"} 0 -gobgp_route_total_path_count{address_family="ipv6_mpls",route_table="local"} 0 -gobgp_route_total_path_count{address_family="ipv6_vpn",route_table="global"} 0 -gobgp_route_total_path_count{address_family="ipv6_vpn",route_table="local"} 0 -gobgp_route_total_path_count{address_family="ipv6_vpn_flowspec",route_table="global"} 0 -gobgp_route_total_path_count{address_family="ipv6_vpn_flowspec",route_table="local"} 0 -gobgp_route_total_path_count{address_family="l2_vpn_flowspec",route_table="global"} 0 -gobgp_route_total_path_count{address_family="l2_vpn_flowspec",route_table="local"} 0 +gobgp_route_total_path_count{address_family="evpn",route_table="global",vrf_name="default"} 0 +gobgp_route_total_path_count{address_family="evpn",route_table="local",vrf_name="default"} 0 +gobgp_route_total_path_count{address_family="ipv4",route_table="global",vrf_name="default"} 3 +gobgp_route_total_path_count{address_family="ipv4",route_table="local",vrf_name="default"} 3 +gobgp_route_total_path_count{address_family="ipv4_encap",route_table="global",vrf_name="default"} 0 +gobgp_route_total_path_count{address_family="ipv4_encap",route_table="local",vrf_name="default"} 0 +gobgp_route_total_path_count{address_family="ipv4_flowspec",route_table="global",vrf_name="default"} 0 +gobgp_route_total_path_count{address_family="ipv4_flowspec",route_table="local",vrf_name="default"} 0 +gobgp_route_total_path_count{address_family="ipv4_mpls",route_table="global",vrf_name="default"} 0 +gobgp_route_total_path_count{address_family="ipv4_mpls",route_table="local",vrf_name="default"} 0 +gobgp_route_total_path_count{address_family="ipv4_vpn",route_table="global",vrf_name="default"} 0 +gobgp_route_total_path_count{address_family="ipv4_vpn",route_table="local",vrf_name="default"} 0 +gobgp_route_total_path_count{address_family="ipv4_vpn_flowspec",route_table="global",vrf_name="default"} 0 +gobgp_route_total_path_count{address_family="ipv4_vpn_flowspec",route_table="local",vrf_name="default"} 0 +gobgp_route_total_path_count{address_family="ipv6",route_table="global",vrf_name="default"} 0 +gobgp_route_total_path_count{address_family="ipv6",route_table="local",vrf_name="default"} 0 +gobgp_route_total_path_count{address_family="ipv6_encap",route_table="global",vrf_name="default"} 0 +gobgp_route_total_path_count{address_family="ipv6_encap",route_table="local",vrf_name="default"} 0 +gobgp_route_total_path_count{address_family="ipv6_flowspec",route_table="global",vrf_name="default"} 0 +gobgp_route_total_path_count{address_family="ipv6_flowspec",route_table="local",vrf_name="default"} 0 +gobgp_route_total_path_count{address_family="ipv6_mpls",route_table="global",vrf_name="default"} 0 +gobgp_route_total_path_count{address_family="ipv6_mpls",route_table="local",vrf_name="default"} 0 +gobgp_route_total_path_count{address_family="ipv6_vpn",route_table="global",vrf_name="default"} 0 +gobgp_route_total_path_count{address_family="ipv6_vpn",route_table="local",vrf_name="default"} 0 +gobgp_route_total_path_count{address_family="ipv6_vpn_flowspec",route_table="global",vrf_name="default"} 0 +gobgp_route_total_path_count{address_family="ipv6_vpn_flowspec",route_table="local",vrf_name="default"} 0 +gobgp_route_total_path_count{address_family="l2_vpn_flowspec",route_table="global",vrf_name="default"} 0 +gobgp_route_total_path_count{address_family="l2_vpn_flowspec",route_table="local",vrf_name="default"} 0 # HELP gobgp_router_asn What is GoBGP AS number. # TYPE gobgp_router_asn gauge gobgp_router_asn 65001 @@ -250,7 +250,7 @@ gobgp_router_id 1 gobgp_router_next_poll 0 # HELP gobgp_router_scrape_time The amount of time it took to scrape the router. # TYPE gobgp_router_scrape_time gauge -gobgp_router_scrape_time 0.019645428 +gobgp_router_scrape_time 0.019395555 # HELP gobgp_router_up Is GoBGP up and responds to queries (1) or is it down (0). # TYPE gobgp_router_up gauge gobgp_router_up 1 diff --git a/go.sum b/go.sum index d39e968..e355682 100644 --- a/go.sum +++ b/go.sum @@ -15,6 +15,8 @@ github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+ github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dgryski/go-farm v0.0.0-20171119141306-ac7624ea8da3/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/eapache/channels v1.1.0/go.mod h1:jMm2qB5Ubtg9zLd+inMZd2/NUvXgzmWXsDaLyQIGfH0= github.com/eapache/queue v1.0.2/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= diff --git a/pkg/gobgp_exporter/collect_rib.go b/pkg/gobgp_exporter/collect_rib.go index 485b355..88c0af8 100644 --- a/pkg/gobgp_exporter/collect_rib.go +++ b/pkg/gobgp_exporter/collect_rib.go @@ -130,6 +130,7 @@ func (n *RouterNode) GetRibCounters() { float64(serverResponse.GetNumDestination()), strings.ToLower(tableTypeName), strings.ToLower(addressFamilyName), + "default", )) n.metrics = append(n.metrics, prometheus.MustNewConstMetric( @@ -138,6 +139,7 @@ func (n *RouterNode) GetRibCounters() { float64(serverResponse.GetNumPath()), strings.ToLower(tableTypeName), strings.ToLower(addressFamilyName), + "default", )) n.metrics = append(n.metrics, prometheus.MustNewConstMetric( @@ -146,6 +148,7 @@ func (n *RouterNode) GetRibCounters() { float64(serverResponse.GetNumAccepted()), strings.ToLower(tableTypeName), strings.ToLower(addressFamilyName), + "default", )) } diff --git a/pkg/gobgp_exporter/describe_node.go b/pkg/gobgp_exporter/describe_node.go index 48c87e0..c34e011 100644 --- a/pkg/gobgp_exporter/describe_node.go +++ b/pkg/gobgp_exporter/describe_node.go @@ -49,25 +49,6 @@ var ( "The amount of time it took to scrape the router.", nil, nil, ) - - routerRibTotalDestinationCount = prometheus.NewDesc( - prometheus.BuildFQName(namespace, "route", "total_destination_count"), - "The number of routes on per address family and route table basis", - []string{"route_table", "address_family"}, nil, - ) - - routerRibTotalPathCount = prometheus.NewDesc( - prometheus.BuildFQName(namespace, "route", "total_path_count"), - "The number of available paths to destinations on per address family and route table basis", - []string{"route_table", "address_family"}, nil, - ) - - routerRibAcceptedPathCount = prometheus.NewDesc( - prometheus.BuildFQName(namespace, "route", "accepted_path_count"), - "The number of accepted paths to destinations on per address family and route table basis", - []string{"route_table", "address_family"}, nil, - ) - routerPeers = prometheus.NewDesc( prometheus.BuildFQName(namespace, "peer", "count"), "The number of BGP peers", diff --git a/pkg/gobgp_exporter/describe_peer.go b/pkg/gobgp_exporter/describe_peer.go index cdb72c0..47e883f 100644 --- a/pkg/gobgp_exporter/describe_peer.go +++ b/pkg/gobgp_exporter/describe_peer.go @@ -41,7 +41,7 @@ var ( ) routerPeerSessionState = prometheus.NewDesc( prometheus.BuildFQName(namespace, "peer", "session_state"), - "What is the state of BGP session to the peer: unknown (0), idle (1), connect (2), active (3), opensent (4), openconfirm (5), established (6)", + "What is the state of BGP session to the peer - unknown (0), idle (1), connect (2), active (3), opensent (4), openconfirm (5), established (6)", []string{"name"}, nil, ) diff --git a/pkg/gobgp_exporter/describe_rib.go b/pkg/gobgp_exporter/describe_rib.go new file mode 100644 index 0000000..3bf0cb7 --- /dev/null +++ b/pkg/gobgp_exporter/describe_rib.go @@ -0,0 +1,39 @@ +// Copyright 2018 Paul Greenberg (greenpau@outlook.com) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package exporter + +import ( + "github.com/prometheus/client_golang/prometheus" +) + +var ( + routerRibTotalDestinationCount = prometheus.NewDesc( + prometheus.BuildFQName(namespace, "route", "total_destination_count"), + "The number of routes on per address family and route table basis", + []string{"route_table", "address_family", "vrf_name"}, nil, + ) + + routerRibTotalPathCount = prometheus.NewDesc( + prometheus.BuildFQName(namespace, "route", "total_path_count"), + "The number of available paths to destinations on per address family and route table basis", + []string{"route_table", "address_family", "vrf_name"}, nil, + ) + + routerRibAcceptedPathCount = prometheus.NewDesc( + prometheus.BuildFQName(namespace, "route", "accepted_path_count"), + "The number of accepted paths to destinations on per address family and route table basis", + []string{"route_table", "address_family", "vrf_name"}, nil, + ) +) diff --git a/pkg/gobgp_exporter/metric_table.go b/pkg/gobgp_exporter/metric_table.go index 5775167..c4fcacb 100644 --- a/pkg/gobgp_exporter/metric_table.go +++ b/pkg/gobgp_exporter/metric_table.go @@ -75,9 +75,9 @@ func (n *RouterNode) GetMetricsTable() string { } sort.Strings(labels) if len(labels) > 0 { - out.WriteString(fmt.Sprintf("`%s` | %s | `%s` |\n", descr["name"], descr["help"], strings.Join(labels, "`, `"))) + out.WriteString(fmt.Sprintf("| `%s` | %s | `%s` |\n", descr["name"], descr["help"], strings.Join(labels, "`, `"))) } else { - out.WriteString(fmt.Sprintf("`%s` | %s | |\n", descr["name"], descr["help"])) + out.WriteString(fmt.Sprintf("| `%s` | %s | |\n", descr["name"], descr["help"])) } } return out.String()