171 lines
14 KiB
JSON
171 lines
14 KiB
JSON
|
|
{
|
||
|
|
"annotations": {"list": [{"builtIn": 1,"datasource": {"type": "datasource","uid": "grafana"},"enable": true,"hide": true,"iconColor": "rgba(0, 211, 255, 1)","name": "Annotations & Alerts","type": "dashboard"}]},
|
||
|
|
"description": "Per-router drilldown — BMP state, peer health, prefix counts, update rate and recent session events for a single monitored router.",
|
||
|
|
"editable": true,
|
||
|
|
"fiscalYearStartMonth": 0,
|
||
|
|
"graphTooltip": 1,
|
||
|
|
"id": null,
|
||
|
|
"links": [
|
||
|
|
{"asDropdown": true,"icon": "external link","includeVars": true,"keepTime": true,"tags": ["obmp-nav"],"title": "OBMP Dashboards","type": "dashboards"}
|
||
|
|
],
|
||
|
|
"panels": [
|
||
|
|
{
|
||
|
|
"datasource": {"type": "postgres","uid": "obmp_postgres"},
|
||
|
|
"description": "BMP session state for this router. Should be UP.",
|
||
|
|
"fieldConfig": {"defaults": {"color": {"mode": "thresholds"},"thresholds": {"mode": "absolute","steps": [{"color": "red","value": null},{"color": "green","value": 1}]},"mappings": [{"options": {"0": {"color": "red","index": 1,"text": "DOWN"},"1": {"color": "green","index": 0,"text": "UP"}},"type": "value"}],"unit": "short"}},
|
||
|
|
"gridPos": {"h": 4,"w": 4,"x": 0,"y": 0},
|
||
|
|
"id": 1,
|
||
|
|
"options": {"colorMode": "background","graphMode": "none","justifyMode": "auto","orientation": "auto","reduceOptions": {"calcs": ["lastNotNull"],"fields": "","values": false},"textMode": "auto"},
|
||
|
|
"targets": [{"datasource": {"type": "postgres","uid": "obmp_postgres"},"format": "time_series","rawSql": "SELECT NOW() AS time, CASE WHEN state = 'up' THEN 1 ELSE 0 END AS \"Router State\"\nFROM routers WHERE hash_id = '$router_hash'::uuid","refId": "A"}],
|
||
|
|
"title": "Router State",
|
||
|
|
"type": "stat"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"datasource": {"type": "postgres","uid": "obmp_postgres"},
|
||
|
|
"description": "BGP peers on this router that are currently up (pre-policy Adj-RIB-In).",
|
||
|
|
"fieldConfig": {"defaults": {"color": {"mode": "thresholds"},"thresholds": {"mode": "absolute","steps": [{"color": "blue","value": null}]},"unit": "short"}},
|
||
|
|
"gridPos": {"h": 4,"w": 4,"x": 4,"y": 0},
|
||
|
|
"id": 2,
|
||
|
|
"options": {"colorMode": "background","graphMode": "none","justifyMode": "auto","orientation": "auto","reduceOptions": {"calcs": ["lastNotNull"],"fields": "","values": false},"textMode": "auto"},
|
||
|
|
"targets": [{"datasource": {"type": "postgres","uid": "obmp_postgres"},"format": "time_series","rawSql": "SELECT NOW() AS time, count(*) AS \"Peers Up\"\nFROM bgp_peers\nWHERE router_hash_id = '$router_hash'::uuid AND isprepolicy = true AND state = 'up'","refId": "A"}],
|
||
|
|
"title": "Peers Up",
|
||
|
|
"type": "stat"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"datasource": {"type": "postgres","uid": "obmp_postgres"},
|
||
|
|
"description": "BGP peers on this router that are not up. Investigate any non-zero value.",
|
||
|
|
"fieldConfig": {"defaults": {"color": {"mode": "thresholds"},"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "red","value": 1}]},"unit": "short"}},
|
||
|
|
"gridPos": {"h": 4,"w": 4,"x": 8,"y": 0},
|
||
|
|
"id": 3,
|
||
|
|
"options": {"colorMode": "background","graphMode": "none","justifyMode": "auto","orientation": "auto","reduceOptions": {"calcs": ["lastNotNull"],"fields": "","values": false},"textMode": "auto"},
|
||
|
|
"targets": [{"datasource": {"type": "postgres","uid": "obmp_postgres"},"format": "time_series","rawSql": "SELECT NOW() AS time, count(*) AS \"Peers Down\"\nFROM bgp_peers\nWHERE router_hash_id = '$router_hash'::uuid AND isprepolicy = true AND state != 'up'","refId": "A"}],
|
||
|
|
"title": "Peers Down",
|
||
|
|
"type": "stat"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"datasource": {"type": "postgres","uid": "obmp_postgres"},
|
||
|
|
"description": "Total IPv4 prefixes across this router's peers (latest stats_peer_rib interval per peer).",
|
||
|
|
"fieldConfig": {"defaults": {"color": {"mode": "thresholds"},"thresholds": {"mode": "absolute","steps": [{"color": "blue","value": null}]},"unit": "short"}},
|
||
|
|
"gridPos": {"h": 4,"w": 4,"x": 12,"y": 0},
|
||
|
|
"id": 4,
|
||
|
|
"options": {"colorMode": "background","graphMode": "none","justifyMode": "auto","orientation": "auto","reduceOptions": {"calcs": ["lastNotNull"],"fields": "","values": false},"textMode": "auto"},
|
||
|
|
"targets": [{"datasource": {"type": "postgres","uid": "obmp_postgres"},"format": "time_series","rawSql": "SELECT NOW() AS time, COALESCE(SUM(s.v4_prefixes),0) AS \"IPv4 Prefixes\"\nFROM bgp_peers p\nLEFT JOIN LATERAL (SELECT v4_prefixes FROM stats_peer_rib sr WHERE sr.peer_hash_id = p.hash_id ORDER BY interval_time DESC LIMIT 1) s ON true\nWHERE p.router_hash_id = '$router_hash'::uuid AND p.isprepolicy = true","refId": "A"}],
|
||
|
|
"title": "IPv4 Prefixes",
|
||
|
|
"type": "stat"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"datasource": {"type": "postgres","uid": "obmp_postgres"},
|
||
|
|
"description": "Total IPv6 prefixes across this router's peers (latest stats_peer_rib interval per peer).",
|
||
|
|
"fieldConfig": {"defaults": {"color": {"mode": "thresholds"},"thresholds": {"mode": "absolute","steps": [{"color": "blue","value": null}]},"unit": "short"}},
|
||
|
|
"gridPos": {"h": 4,"w": 4,"x": 16,"y": 0},
|
||
|
|
"id": 5,
|
||
|
|
"options": {"colorMode": "background","graphMode": "none","justifyMode": "auto","orientation": "auto","reduceOptions": {"calcs": ["lastNotNull"],"fields": "","values": false},"textMode": "auto"},
|
||
|
|
"targets": [{"datasource": {"type": "postgres","uid": "obmp_postgres"},"format": "time_series","rawSql": "SELECT NOW() AS time, COALESCE(SUM(s.v6_prefixes),0) AS \"IPv6 Prefixes\"\nFROM bgp_peers p\nLEFT JOIN LATERAL (SELECT v6_prefixes FROM stats_peer_rib sr WHERE sr.peer_hash_id = p.hash_id ORDER BY interval_time DESC LIMIT 1) s ON true\nWHERE p.router_hash_id = '$router_hash'::uuid AND p.isprepolicy = true","refId": "A"}],
|
||
|
|
"title": "IPv6 Prefixes",
|
||
|
|
"type": "stat"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"datasource": {"type": "postgres","uid": "obmp_postgres"},
|
||
|
|
"description": "Peer session down-events on this router in the last hour.",
|
||
|
|
"fieldConfig": {"defaults": {"color": {"mode": "thresholds"},"thresholds": {"mode": "absolute","steps": [{"color": "green","value": null},{"color": "yellow","value": 1},{"color": "red","value": 5}]},"unit": "short"}},
|
||
|
|
"gridPos": {"h": 4,"w": 4,"x": 20,"y": 0},
|
||
|
|
"id": 6,
|
||
|
|
"options": {"colorMode": "background","graphMode": "none","justifyMode": "auto","orientation": "auto","reduceOptions": {"calcs": ["lastNotNull"],"fields": "","values": false},"textMode": "auto"},
|
||
|
|
"targets": [{"datasource": {"type": "postgres","uid": "obmp_postgres"},"format": "time_series","rawSql": "SELECT NOW() AS time, count(*) AS \"Flaps (1h)\"\nFROM peer_event_log e\nJOIN bgp_peers p ON p.hash_id = e.peer_hash_id\nWHERE p.router_hash_id = '$router_hash'::uuid AND e.state = 'down' AND e.timestamp > NOW() - INTERVAL '1 hour'","refId": "A"}],
|
||
|
|
"title": "Flap Events (1h)",
|
||
|
|
"type": "stat"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"datasource": {"type": "postgres","uid": "obmp_postgres"},
|
||
|
|
"description": "Identity and BMP state for the selected router.",
|
||
|
|
"fieldConfig": {
|
||
|
|
"defaults": {"custom": {"align": "auto","displayMode": "auto"}},
|
||
|
|
"overrides": [{"matcher": {"id": "byName","options": "State"},"properties": [{"id": "custom.displayMode","value": "color-background"},{"id": "mappings","value": [{"options": {"down": {"color": "red","index": 1,"text": "DOWN"},"up": {"color": "green","index": 0,"text": "UP"}},"type": "value"}]}]}]
|
||
|
|
},
|
||
|
|
"gridPos": {"h": 5,"w": 24,"x": 0,"y": 4},
|
||
|
|
"id": 7,
|
||
|
|
"options": {"footer": {"countRows": false,"fields": "","reducer": ["sum"],"show": false},"showHeader": true},
|
||
|
|
"targets": [{"datasource": {"type": "postgres","uid": "obmp_postgres"},"format": "table","rawSql": "SELECT\n r.name AS \"Router\",\n host(r.ip_address) AS \"Mgmt IP\",\n host(r.bgp_id) AS \"BGP ID\",\n r.router_as AS \"AS\",\n r.state AS \"State\",\n r.timestamp AS \"Last Update\",\n r.description AS \"Description\"\nFROM routers r\nWHERE r.hash_id = '$router_hash'::uuid","refId": "A"}],
|
||
|
|
"title": "Router Info",
|
||
|
|
"type": "table"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"datasource": {"type": "postgres","uid": "obmp_postgres"},
|
||
|
|
"description": "BGP peers on this router with state, ASN and latest prefix counts. Click a peer to open Peer Detail.",
|
||
|
|
"fieldConfig": {
|
||
|
|
"defaults": {"custom": {"align": "auto","displayMode": "auto"}},
|
||
|
|
"overrides": [
|
||
|
|
{"matcher": {"id": "byName","options": "State"},"properties": [{"id": "custom.displayMode","value": "color-background"},{"id": "mappings","value": [{"options": {"down": {"color": "red","index": 1,"text": "DOWN"},"up": {"color": "green","index": 0,"text": "UP"}},"type": "value"}]}]},
|
||
|
|
{"matcher": {"id": "byName","options": "Peer"},"properties": [{"id": "links","value": [{"title": "Open Peer Detail","url": "/d/obmp-peer-detail/peer-detail?var-peer_hash=${__data.fields[\"peer_hash_id\"]}"}]}]},
|
||
|
|
{"matcher": {"id": "byName","options": "peer_hash_id"},"properties": [{"id": "custom.hidden","value": true}]}
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"gridPos": {"h": 11,"w": 24,"x": 0,"y": 9},
|
||
|
|
"id": 8,
|
||
|
|
"options": {"footer": {"countRows": false,"fields": "","reducer": ["sum"],"show": false},"showHeader": true,"sortBy": [{"desc": false,"displayName": "State"}]},
|
||
|
|
"targets": [{"datasource": {"type": "postgres","uid": "obmp_postgres"},"format": "table","rawSql": "SELECT\n p.hash_id AS peer_hash_id,\n COALESCE(NULLIF(p.name,''), p.peer_addr::text) AS \"Peer\",\n host(p.peer_addr) AS \"Address\",\n p.peer_as AS \"AS\",\n p.state AS \"State\",\n COALESCE(s.v4_prefixes,0) AS \"IPv4 Prefixes\",\n COALESCE(s.v6_prefixes,0) AS \"IPv6 Prefixes\",\n p.timestamp AS \"Last Change\"\nFROM bgp_peers p\nLEFT JOIN LATERAL (SELECT v4_prefixes, v6_prefixes FROM stats_peer_rib sr WHERE sr.peer_hash_id = p.hash_id ORDER BY interval_time DESC LIMIT 1) s ON true\nWHERE p.router_hash_id = '$router_hash'::uuid AND p.isprepolicy = true\nORDER BY p.state, p.peer_addr","refId": "A"}],
|
||
|
|
"title": "Peers",
|
||
|
|
"type": "table"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"datasource": {"type": "postgres","uid": "obmp_postgres"},
|
||
|
|
"description": "BGP update vs withdraw rate across this router's peers (from stats_chg_bypeer).",
|
||
|
|
"fieldConfig": {
|
||
|
|
"defaults": {"color": {"mode": "palette-classic"},"custom": {"axisCenteredZero": false,"axisColorMode": "text","axisLabel": "","axisPlacement": "auto","barAlignment": 0,"drawStyle": "line","fillOpacity": 20,"gradientMode": "none","lineInterpolation": "smooth","lineWidth": 1,"pointSize": 5,"scaleDistribution": {"type": "linear"},"showPoints": "never","spanNulls": false,"stacking": {"group": "A","mode": "none"},"thresholdsStyle": {"mode": "off"}},"unit": "short"},
|
||
|
|
"overrides": [{"matcher": {"id": "byName","options": "Withdraws"},"properties": [{"id": "color","value": {"fixedColor": "red","mode": "fixed"}}]},{"matcher": {"id": "byName","options": "Updates"},"properties": [{"id": "color","value": {"fixedColor": "green","mode": "fixed"}}]}]
|
||
|
|
},
|
||
|
|
"gridPos": {"h": 9,"w": 24,"x": 0,"y": 20},
|
||
|
|
"id": 9,
|
||
|
|
"options": {"legend": {"calcs": ["sum"],"displayMode": "table","placement": "bottom","showLegend": true},"tooltip": {"mode": "multi","sort": "none"}},
|
||
|
|
"targets": [{"datasource": {"type": "postgres","uid": "obmp_postgres"},"format": "time_series","rawSql": "SELECT\n $__timeGroupAlias(c.interval_time,'5m'),\n SUM(c.updates) AS \"Updates\",\n SUM(c.withdraws) AS \"Withdraws\"\nFROM stats_chg_bypeer c\nJOIN bgp_peers p ON p.hash_id = c.peer_hash_id\nWHERE p.router_hash_id = '$router_hash'::uuid AND $__timeFilter(c.interval_time)\nGROUP BY 1\nORDER BY 1","refId": "A"}],
|
||
|
|
"title": "BGP Update Rate",
|
||
|
|
"type": "timeseries"
|
||
|
|
},
|
||
|
|
{
|
||
|
|
"datasource": {"type": "postgres","uid": "obmp_postgres"},
|
||
|
|
"description": "Recent BGP session state changes for this router's peers.",
|
||
|
|
"fieldConfig": {
|
||
|
|
"defaults": {"custom": {"align": "auto","displayMode": "auto"}},
|
||
|
|
"overrides": [{"matcher": {"id": "byName","options": "State"},"properties": [{"id": "custom.displayMode","value": "color-background"},{"id": "mappings","value": [{"options": {"down": {"color": "red","index": 1,"text": "DOWN"},"up": {"color": "green","index": 0,"text": "UP"}},"type": "value"}]}]}]
|
||
|
|
},
|
||
|
|
"gridPos": {"h": 9,"w": 24,"x": 0,"y": 29},
|
||
|
|
"id": 10,
|
||
|
|
"options": {"footer": {"countRows": false,"fields": "","reducer": ["sum"],"show": false},"showHeader": true,"sortBy": [{"desc": true,"displayName": "Time"}]},
|
||
|
|
"targets": [{"datasource": {"type": "postgres","uid": "obmp_postgres"},"format": "table","rawSql": "SELECT\n e.timestamp AS \"Time\",\n COALESCE(NULLIF(p.name,''), p.peer_addr::text) AS \"Peer\",\n host(p.peer_addr) AS \"Address\",\n e.state AS \"State\",\n e.error_text AS \"Reason\"\nFROM peer_event_log e\nJOIN bgp_peers p ON p.hash_id = e.peer_hash_id\nWHERE p.router_hash_id = '$router_hash'::uuid AND $__timeFilter(e.timestamp)\nORDER BY e.timestamp DESC\nLIMIT 100","refId": "A"}],
|
||
|
|
"title": "Recent Peer Events",
|
||
|
|
"type": "table"
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"refresh": "1m",
|
||
|
|
"schemaVersion": 36,
|
||
|
|
"style": "dark",
|
||
|
|
"tags": ["obmp","obmp-nav","operations","router"],
|
||
|
|
"templating": {
|
||
|
|
"list": [
|
||
|
|
{
|
||
|
|
"current": {},
|
||
|
|
"datasource": {"type": "postgres","uid": "obmp_postgres"},
|
||
|
|
"definition": "select name as __text, hash_id as __value from routers where length(name) > 0",
|
||
|
|
"hide": 0,
|
||
|
|
"includeAll": false,
|
||
|
|
"label": "Router",
|
||
|
|
"multi": false,
|
||
|
|
"name": "router_hash",
|
||
|
|
"options": [],
|
||
|
|
"query": "select name as __text, hash_id as __value from routers where length(name) > 0",
|
||
|
|
"refresh": 1,
|
||
|
|
"regex": "",
|
||
|
|
"skipUrlSync": false,
|
||
|
|
"sort": 1,
|
||
|
|
"type": "query"
|
||
|
|
}
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"time": {"from": "now-6h","to": "now"},
|
||
|
|
"timepicker": {},
|
||
|
|
"timezone": "browser",
|
||
|
|
"title": "Router Detail",
|
||
|
|
"uid": "obmp-router-detail",
|
||
|
|
"version": 1
|
||
|
|
}
|