tynany / frr_exporter

Prometheus exporter for Free Range Routing
MIT License
100 stars 34 forks source link

Is there a grafana dashboard somewhere please? #75

Closed alcelafranque closed 1 year ago

alcelafranque commented 2 years ago

thank you for this work, the project is really nice. I wonder if someone has made a grafana dashboard?

tynany commented 2 years ago

I'm happy to build a dashboard if you let me know what you are after.

I find dashboards very subjective and there is rarely a one-size-fits-all.

alcelafranque commented 2 years ago

Thanks !

It's true, I agree with that.

I am looking for a grafana dashboard that can allow me to visualize:

To be honest I use node exporter on a few of my servers without understanding all the exported values ​​and times when I need to debug these metrics come in handy.

joseph-theiss commented 1 year ago

image image Some example dashboards I use in PROD.

onedr0p commented 1 year ago

@joseph-theiss are you just teasing us? Would you be kind to share the dashboard? Thanks 😄

felbinger commented 1 year ago

I created a dashboard for bgp and bfd today. The router visualization on the left side ist still a work in progress (using grafana node graph api)...

image

Exported Dashboard ```json { "annotations": { "list": [ { "builtIn": 1, "datasource": { "type": "grafana", "uid": "-- Grafana --" }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", "target": { "limit": 100, "matchAny": false, "tags": [], "type": "dashboard" }, "type": "dashboard" } ] }, "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, "id": 29, "links": [], "liveNow": false, "panels": [ { "datasource": { "type": "hamedkarbasi93-nodegraphapi-datasource", "uid": "Bcmsqty4z" }, "gridPos": { "h": 27, "w": 16, "x": 0, "y": 0 }, "id": 5, "targets": [ { "key": "Q-590b8d3f-19c6-4e68-9a02-9ab18944995d-0", "queryText": "*", "refId": "B" } ], "title": "Router Overview", "type": "nodeGraph" }, { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "custom": { "align": "auto", "displayMode": "auto", "inspect": false }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] } }, "overrides": [ { "matcher": { "id": "byName", "options": "State" }, "properties": [ { "id": "mappings", "value": [ { "options": { "0": { "color": "dark-red", "index": 0, "text": "down" }, "1": { "color": "dark-green", "index": 1, "text": "up" } }, "type": "value" } ] }, { "id": "custom.displayMode", "value": "color-background-solid" } ] }, { "matcher": { "id": "byName", "options": "Value #frr_bfd_peer_uptime" }, "properties": [ { "id": "unit", "value": "s" } ] } ] }, "gridPos": { "h": 27, "w": 8, "x": 16, "y": 0 }, "id": 7, "options": { "footer": { "fields": "", "reducer": [ "sum" ], "show": false }, "showHeader": true, "sortBy": [ { "desc": false, "displayName": "State" } ] }, "pluginVersion": "9.1.1", "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", "expr": "frr_bfd_peer_state", "format": "table", "hide": false, "legendFormat": "", "range": true, "refId": "frr_bfd_peer_state" }, { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", "expr": "frr_bfd_peer_uptime", "format": "table", "hide": false, "legendFormat": "", "range": true, "refId": "frr_bfd_peer_uptime" } ], "title": "Bidirectional Forwarding Detection", "transformations": [ { "id": "seriesToColumns", "options": { "byField": "peer" } }, { "id": "organize", "options": { "excludeByName": { "Time 1": true, "Time 2": true, "Time 3": true, "__name__ 1": true, "__name__ 2": true, "__name__ 3": true, "instance": false, "instance 1": true, "instance 2": true, "job 1": true, "job 2": true, "job 3": true, "local 1": true, "local 2": true, "peer 2": true }, "indexByName": {}, "renameByName": { "Value #frr_bfd_peer_count": "Peer Count", "Value #frr_bfd_peer_state": "State", "Value #frr_bfd_peer_uptime": "Uptime", "local 1": "", "peer 1": "", "peer 2": "" } } } ], "type": "table" }, { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "custom": { "align": "auto", "displayMode": "auto", "inspect": false }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] } }, "overrides": [ { "matcher": { "id": "byName", "options": "Uptime" }, "properties": [ { "id": "unit", "value": "s" } ] }, { "matcher": { "id": "byName", "options": "State" }, "properties": [ { "id": "mappings", "value": [ { "options": { "0": { "color": "dark-red", "index": 0, "text": "down" }, "1": { "color": "dark-green", "index": 1, "text": "established" }, "2": { "color": "dark-orange", "index": 2, "text": "idle (admin)" } }, "type": "value" } ] }, { "id": "custom.displayMode", "value": "color-background-solid" } ] }, { "matcher": { "id": "byName", "options": "name" }, "properties": [ { "id": "mappings", "value": [ { "options": { "64999": { "index": 1, "text": "NOPE" }, "65000": { "index": 2, "text": "NOPE" } }, "type": "value" } ] } ] } ] }, "gridPos": { "h": 12, "w": 24, "x": 0, "y": 27 }, "id": 2, "options": { "footer": { "fields": "", "reducer": [ "sum" ], "show": false }, "showHeader": true, "sortBy": [ { "desc": false, "displayName": "State" } ] }, "pluginVersion": "9.1.1", "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", "exemplar": false, "expr": "frr_bgp_peer_state{instance=~\"$instance\"}", "format": "table", "hide": false, "instant": true, "legendFormat": "", "range": false, "refId": "frr_bgp_peer_state" }, { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", "exemplar": false, "expr": "frr_bgp_peer_prefixes_advertised_count_total{instance=~\"$instance\"}", "format": "table", "hide": false, "instant": true, "legendFormat": "", "range": false, "refId": "frr_bgp_peer_prefixes_advertised_count_total" }, { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", "exemplar": false, "expr": "frr_bgp_peer_prefixes_received_count_total{instance=~\"$instance\"}", "format": "table", "hide": false, "instant": true, "legendFormat": "", "range": false, "refId": "frr_bgp_peer_prefixes_received_count_total" }, { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", "expr": "frr_bgp_peer_uptime_seconds{instance=~\"$instance\"}", "format": "table", "hide": false, "legendFormat": "", "range": true, "refId": "frr_bgp_peer_uptime_seconds" } ], "title": "Border Gateway Protocol", "transformations": [ { "id": "seriesToColumns", "options": { "byField": "peer" } }, { "id": "organize", "options": { "excludeByName": { "Time 1": true, "Time 2": true, "Time 3": true, "Time 4": true, "Value #frr_bgp_peer_prefixes_advertised_count_total": false, "Value #frr_bgp_peer_prefixes_received_count_total": false, "Value #frr_bgp_peer_state": false, "__name__ 1": true, "__name__ 2": true, "__name__ 3": true, "__name__ 4": true, "afi 2": true, "afi 3": true, "afi 4": true, "instance": true, "instance 4": true, "job 1": true, "job 2": true, "job 3": true, "job 4": true, "local_as 1": false, "local_as 2": true, "local_as 3": true, "local_as 4": false, "peer 1": false, "peer 2": true, "peer 3": true, "peer_as 1": false, "peer_as 2": true, "peer_as 3": true, "peer_as 4": true, "safi 1": true, "safi 2": true, "safi 3": true, "safi 4": true, "vrf 1": true, "vrf 2": true, "vrf 3": true, "vrf 4": true }, "indexByName": { "Time 1": 1, "Time 2": 12, "Time 3": 22, "Time 4": 32, "Value #frr_bgp_peer_prefixes_advertised_count_total": 21, "Value #frr_bgp_peer_prefixes_received_count_total": 31, "Value #frr_bgp_peer_state": 11, "Value #frr_bgp_peer_uptime_seconds": 40, "__name__ 1": 2, "__name__ 2": 13, "__name__ 3": 23, "__name__ 4": 33, "afi 1": 3, "afi 2": 14, "afi 3": 24, "afi 4": 34, "instance 1": 4, "instance 2": 15, "instance 3": 25, "instance 4": 35, "job 1": 5, "job 2": 16, "job 3": 26, "job 4": 36, "local_as 1": 6, "local_as 2": 17, "local_as 3": 27, "local_as 4": 7, "peer": 0, "peer_as 1": 8, "peer_as 2": 18, "peer_as 3": 28, "peer_as 4": 37, "safi 1": 9, "safi 2": 19, "safi 3": 29, "safi 4": 38, "vrf 1": 10, "vrf 2": 20, "vrf 3": 30, "vrf 4": 39 }, "renameByName": { "Time 3": "", "Value #frr_bgp_peer_prefixes_advertised_count_total": "Advertised Prefixes", "Value #frr_bgp_peer_prefixes_received_count_total": "Received Prefixes", "Value #frr_bgp_peer_state": "State", "Value #frr_bgp_peer_uptime_seconds": "Uptime", "afi 3": "", "instance 4": "", "job 1": "", "local_as 1": "local_as", "local_as 2": "", "local_as 4": "name", "vrf 3": "" } } }, { "disabled": true, "id": "groupBy", "options": { "fields": { "local_as": { "aggregations": [], "operation": "groupby" }, "peer": { "aggregations": [], "operation": "groupby" }, "peer_as": { "aggregations": [], "operation": "groupby" } } } } ], "type": "table" } ], "refresh": "", "schemaVersion": 37, "style": "dark", "tags": [], "templating": { "list": [ { "current": { "selected": false, "text": "monitoring", "value": "monitoring" }, "hide": 0, "includeAll": false, "label": "datasource", "multi": false, "name": "DS_PROMETHEUS", "options": [], "query": "prometheus", "queryValue": "", "refresh": 1, "regex": "", "skipUrlSync": false, "type": "datasource" }, { "current": { "selected": false, "text": "All", "value": "$__all" }, "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, "definition": "label_values(frr_bgp_peer_state, instance)", "hide": 0, "includeAll": true, "label": "instance", "multi": false, "name": "instance", "options": [], "query": { "query": "label_values(frr_bgp_peer_state, instance)", "refId": "StandardVariableQuery" }, "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 2, "type": "query" } ] }, "time": { "from": "now-6h", "to": "now" }, "timepicker": {}, "timezone": "", "title": "Routers", "uid": "nVMcuFsVz", "version": 25, "weekStart": "" } ```
felbinger commented 1 year ago

I noticed some problems (neighbors from different local_as to the same peer_as with the same peer address, as you would have if with the routeservers of an internet exchange point) with the previous version, so here is an updated with two tables (one for bgp and one for bfd) instead of one table. I also added a graph to see how the advertised/received prefixes change over time. If anyone has an idea on how to combine the two types into one table contact me, please!

image

Exported Dashboard ```json { "annotations": { "list": [ { "builtIn": 1, "datasource": { "type": "grafana", "uid": "-- Grafana --" }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", "target": { "limit": 100, "matchAny": false, "tags": [], "type": "dashboard" }, "type": "dashboard" } ] }, "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, "id": 30, "links": [], "liveNow": false, "panels": [ { "datasource": { "type": "prometheus", "uid": "N4xamoBnz" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "auto", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 0 }, "id": 11, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "N4xamoBnz" }, "editorMode": "code", "exemplar": false, "expr": "frr_bgp_peer_prefixes_advertised_count_total{instance=~\"$instance\"}", "instant": false, "legendFormat": "{{local_as}}->{{peer_as}} ({{afi}})", "range": true, "refId": "A" } ], "title": "Advertised Prefixes", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "N4xamoBnz" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "auto", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 0 }, "id": 12, "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "N4xamoBnz" }, "editorMode": "code", "exemplar": false, "expr": "frr_bgp_peer_prefixes_received_count_total{instance=~\"$instance\"}", "instant": false, "legendFormat": "{{local_as}}<-{{peer_as}} ({{afi}})", "range": true, "refId": "A" } ], "title": "Recevied Prefixes", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "custom": { "align": "auto", "displayMode": "auto", "inspect": false }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "transparent", "value": null } ] } }, "overrides": [ { "matcher": { "id": "byName", "options": "BGP Uptime" }, "properties": [ { "id": "unit", "value": "s" } ] }, { "matcher": { "id": "byName", "options": "BGP State" }, "properties": [ { "id": "mappings", "value": [ { "options": { "0": { "color": "dark-red", "index": 0, "text": "down" }, "1": { "color": "dark-green", "index": 1, "text": "established" }, "2": { "color": "dark-orange", "index": 2, "text": "idle (admin)" } }, "type": "value" } ] }, { "id": "custom.displayMode", "value": "color-background-solid" } ] }, { "matcher": { "id": "byName", "options": "name" }, "properties": [ { "id": "mappings", "value": [ { "options": { "12345": { "index": 0, "text": "irrelevant.net" }, "54321": { "index": 1, "text": "irrelevant2.de" } }, "type": "value" } ] } ] }, { "matcher": { "id": "byName", "options": "BFD Uptime" }, "properties": [ { "id": "unit", "value": "s" } ] }, { "matcher": { "id": "byName", "options": "BFD State" }, "properties": [ { "id": "custom.displayMode", "value": "color-background-solid" }, { "id": "mappings", "value": [ { "options": { "0": { "color": "dark-red", "index": 0, "text": "down" }, "1": { "color": "dark-green", "index": 1, "text": "up" } }, "type": "value" } ] } ] } ] }, "gridPos": { "h": 22, "w": 24, "x": 0, "y": 8 }, "id": 2, "options": { "footer": { "fields": "", "reducer": [ "sum" ], "show": false }, "showHeader": true, "sortBy": [ { "desc": false, "displayName": "BGP State" } ] }, "pluginVersion": "9.1.1", "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", "exemplar": false, "expr": "label_join(frr_bgp_peer_state{instance=~\"$instance\"}, \"combined_label\", \"<->\", \"local_as\", \"peer\")", "format": "table", "hide": false, "instant": true, "legendFormat": "", "range": false, "refId": "frr_bgp_peer_state" }, { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", "exemplar": false, "expr": "label_join(frr_bgp_peer_prefixes_advertised_count_total{instance=~\"$instance\"}, \"combined_label\", \"<->\", \"local_as\",\"peer\")", "format": "table", "hide": false, "instant": true, "legendFormat": "", "range": false, "refId": "frr_bgp_peer_prefixes_advertised_count_total" }, { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", "exemplar": false, "expr": "label_join(frr_bgp_peer_prefixes_received_count_total{instance=~\"$instance\"}, \"combined_label\", \"<->\", \"local_as\", \"peer\")", "format": "table", "hide": false, "instant": true, "legendFormat": "", "range": false, "refId": "frr_bgp_peer_prefixes_received_count_total" }, { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", "expr": "label_join(frr_bgp_peer_uptime_seconds{instance=~\"$instance\"}, \"combined_label\", \"<->\", \"local_as\", \"peer\")", "format": "table", "hide": false, "legendFormat": "", "range": true, "refId": "frr_bgp_peer_uptime_seconds" }, { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", "exemplar": false, "expr": "label_join(frr_bfd_peer_state{instance=~\"$instance\"}, \"combined_label\", \"<->\", \"local_as\", \"peer\")", "format": "table", "hide": true, "instant": true, "legendFormat": "", "range": false, "refId": "frr_bfd_peer_state" }, { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", "exemplar": false, "expr": "label_join(frr_bfd_peer_uptime{instance=~\"$instance\"}, \"combined_label\", \"<->\", \"local_as\", \"peer\")", "format": "table", "hide": true, "instant": true, "legendFormat": "", "range": false, "refId": "frr_bfd_peer_uptime" } ], "title": "Border Gateway Protocol", "transformations": [ { "id": "seriesToColumns", "options": { "byField": "combined_label" } }, { "id": "organize", "options": { "excludeByName": { "Time 1": true, "Time 2": true, "Time 3": true, "Time 4": true, "Time 5": true, "Time 6": true, "Value #frr_bgp_peer_prefixes_advertised_count_total": false, "Value #frr_bgp_peer_prefixes_received_count_total": false, "Value #frr_bgp_peer_state": false, "__name__ 1": true, "__name__ 2": true, "__name__ 3": true, "__name__ 4": true, "__name__ 5": true, "__name__ 6": true, "afi 1": true, "afi 2": true, "afi 3": true, "afi 4": true, "combined_label": true, "instance": true, "instance 4": true, "instance 5": true, "instance 6": true, "job 1": true, "job 2": true, "job 3": true, "job 4": true, "job 5": true, "job 6": true, "local 1": true, "local 2": true, "local_as 1": false, "local_as 2": true, "local_as 3": true, "local_as 4": false, "peer 1": false, "peer 2": true, "peer 3": true, "peer 4": true, "peer_as 1": false, "peer_as 2": true, "peer_as 3": true, "peer_as 4": true, "safi 1": true, "safi 2": true, "safi 3": true, "safi 4": true, "vrf 1": true, "vrf 2": true, "vrf 3": true, "vrf 4": true }, "indexByName": { "Time 1": 1, "Time 2": 12, "Time 3": 21, "Time 4": 35, "Value #frr_bgp_peer_prefixes_advertised_count_total": 30, "Value #frr_bgp_peer_prefixes_received_count_total": 31, "Value #frr_bgp_peer_state": 11, "Value #frr_bgp_peer_uptime_seconds": 44, "__name__ 1": 2, "__name__ 2": 13, "__name__ 3": 22, "__name__ 4": 36, "afi 1": 3, "afi 2": 14, "afi 3": 23, "afi 4": 37, "combined_label": 32, "instance 1": 4, "instance 2": 15, "instance 3": 24, "instance 4": 38, "job 1": 5, "job 2": 16, "job 3": 25, "job 4": 39, "local_as 1": 6, "local_as 2": 17, "local_as 3": 26, "local_as 4": 7, "peer 1": 0, "peer 2": 33, "peer 3": 34, "peer 4": 40, "peer_as 1": 8, "peer_as 2": 18, "peer_as 3": 27, "peer_as 4": 41, "safi 1": 9, "safi 2": 19, "safi 3": 28, "safi 4": 42, "vrf 1": 10, "vrf 2": 20, "vrf 3": 29, "vrf 4": 43 }, "renameByName": { "Time 3": "", "Time 6": "", "Value #frr_bfd_peer_state": "BFD State", "Value #frr_bfd_peer_uptime": "BFD Uptime", "Value #frr_bgp_peer_prefixes_advertised_count_total": "Advertised Prefixes", "Value #frr_bgp_peer_prefixes_received_count_total": "Received Prefixes", "Value #frr_bgp_peer_state": "BGP State", "Value #frr_bgp_peer_uptime_seconds": "BGP Uptime", "__name__ 5": "", "afi 3": "", "instance 4": "", "job 1": "", "local 1": "", "local_as 1": "local_as", "local_as 2": "", "local_as 4": "name", "peer": "neighbor", "peer 1": "neighbor", "vrf 3": "" } } }, { "id": "groupBy", "options": { "fields": { "combined_label": { "aggregations": [], "operation": "aggregate" }, "local_as": { "aggregations": [] }, "peer 1": { "aggregations": [] } } } } ], "type": "table" }, { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "custom": { "align": "auto", "displayMode": "auto", "inspect": false }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "transparent", "value": null } ] } }, "overrides": [ { "matcher": { "id": "byName", "options": "BFD Uptime" }, "properties": [ { "id": "unit", "value": "s" } ] }, { "matcher": { "id": "byName", "options": "BFD State" }, "properties": [ { "id": "custom.displayMode", "value": "color-background-solid" }, { "id": "mappings", "value": [ { "options": { "0": { "color": "dark-red", "index": 0, "text": "down" }, "1": { "color": "dark-green", "index": 1, "text": "up" } }, "type": "value" } ] } ] }, { "matcher": { "id": "byName", "options": "name" }, "properties": [ { "id": "mappings", "value": [ { "options": { "pattern": "^204.11.2.22:.*", "result": { "index": 0, "text": "gw-ch1.freifunk-vechta.de" } }, "type": "regex" }, { "options": { "pattern": "^185.44.80.255:.*", "result": { "index": 1, "text": "r1.as203218.net" } }, "type": "regex" }, { "options": { "pattern": "^(.*):.*", "result": { "index": 2, "text": "$1" } }, "type": "regex" } ] } ] } ] }, "gridPos": { "h": 22, "w": 24, "x": 0, "y": 30 }, "id": 9, "options": { "footer": { "fields": "", "reducer": [ "sum" ], "show": false }, "showHeader": true, "sortBy": [ { "desc": false, "displayName": "BGP State" } ] }, "pluginVersion": "9.1.1", "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", "exemplar": false, "expr": "frr_bfd_peer_state{instance=~\"$instance\"}", "format": "table", "hide": false, "instant": true, "legendFormat": "", "range": false, "refId": "frr_bfd_peer_state" }, { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, "editorMode": "code", "exemplar": false, "expr": "frr_bfd_peer_uptime{instance=~\"$instance\"}", "format": "table", "hide": false, "instant": true, "legendFormat": "", "range": false, "refId": "frr_bfd_peer_uptime" } ], "title": "Bidirectional Forwarding Detection", "transformations": [ { "id": "seriesToColumns", "options": { "byField": "peer" } }, { "id": "organize", "options": { "excludeByName": { "Time 1": true, "Time 2": true, "__name__ 1": true, "__name__ 2": true, "instance 1": false, "instance 2": true, "job 1": true, "job 2": true, "local 1": true, "local 2": true }, "indexByName": {}, "renameByName": { "Value #frr_bfd_peer_state": "BFD State", "Value #frr_bfd_peer_uptime": "BFD Uptime", "__name__ 1": "", "instance 1": "name", "local 2": "" } } } ], "type": "table" } ], "refresh": false, "schemaVersion": 37, "style": "dark", "tags": [], "templating": { "list": [ { "current": { "selected": false, "text": "12345", "value": "12345" }, "hide": 0, "includeAll": false, "label": "datasource", "multi": false, "name": "DS_PROMETHEUS", "options": [], "query": "prometheus", "queryValue": "", "refresh": 1, "regex": "", "skipUrlSync": false, "type": "datasource" }, { "current": { "selected": true, "text": [ "All" ], "value": [ "$__all" ] }, "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, "definition": "label_values(frr_bgp_peer_state, instance)", "hide": 0, "includeAll": true, "label": "instance", "multi": true, "name": "instance", "options": [], "query": { "query": "label_values(frr_bgp_peer_state, instance)", "refId": "StandardVariableQuery" }, "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 2, "type": "query" } ] }, "time": { "from": "now-6h", "to": "now" }, "timepicker": {}, "timezone": "", "title": "Routers Copy", "uid": "AmqQ0YU4z", "version": 1, "weekStart": "" } ```