Both L3VPN dashboards had a static custom 'rd' variable holding only
the '-' (all) sentinel — you could not actually filter by a VRF.
Convert 'rd' to a query variable that discovers route distinguishers
from l3vpn_rib. Degrades cleanly on the (currently empty) lab table:
the query always returns '-', so behaviour is unchanged until real
L3VPN data exists, then RDs auto-populate. Existing panel SQL
('$rd' = '-' OR rd = '$rd') is untouched.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
708 lines
18 KiB
JSON
708 lines
18 KiB
JSON
{
|
|
"annotations": {
|
|
"list": [
|
|
{
|
|
"builtIn": 1,
|
|
"datasource": {
|
|
"type": "datasource",
|
|
"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"
|
|
}
|
|
]
|
|
},
|
|
"description": "",
|
|
"editable": true,
|
|
"fiscalYearStartMonth": 0,
|
|
"graphTooltip": 0,
|
|
"id": 20,
|
|
"links": [
|
|
{
|
|
"asDropdown": true,
|
|
"icon": "external link",
|
|
"includeVars": true,
|
|
"keepTime": true,
|
|
"tags": [
|
|
"obmp-nav"
|
|
],
|
|
"title": "OBMP Dashboards",
|
|
"type": "dashboards"
|
|
}
|
|
],
|
|
"liveNow": false,
|
|
"panels": [
|
|
{
|
|
"datasource": {
|
|
"type": "postgres",
|
|
"uid": "obmp_postgres"
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"mode": "thresholds"
|
|
},
|
|
"custom": {
|
|
"align": "auto",
|
|
"displayMode": "auto",
|
|
"inspect": false
|
|
},
|
|
"decimals": 0,
|
|
"displayName": "",
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green",
|
|
"value": null
|
|
},
|
|
{
|
|
"color": "red",
|
|
"value": 80
|
|
}
|
|
]
|
|
},
|
|
"unit": "none"
|
|
},
|
|
"overrides": [
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "lastmodified"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "unit",
|
|
"value": "time: YYYY-MM-DD HH:mm:ss.SSS"
|
|
},
|
|
{
|
|
"id": "custom.width",
|
|
"value": 224
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"gridPos": {
|
|
"h": 6,
|
|
"w": 24,
|
|
"x": 0,
|
|
"y": 0
|
|
},
|
|
"id": 5,
|
|
"options": {
|
|
"footer": {
|
|
"fields": "",
|
|
"reducer": [
|
|
"sum"
|
|
],
|
|
"show": false
|
|
},
|
|
"showHeader": true,
|
|
"sortBy": []
|
|
},
|
|
"pluginVersion": "9.1.7",
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "postgres",
|
|
"uid": "obmp_postgres"
|
|
},
|
|
"format": "table",
|
|
"group": [],
|
|
"hide": false,
|
|
"metricColumn": "none",
|
|
"rawQuery": true,
|
|
"rawSql": "select lastmodified,CASE WHEN iswithdrawn THEN 'Withdrawn' ELSE 'Active' END as state,routername,peername,prefix,prefixlen,\n origin_as,med,localpref,nh,as_path,communities \n from v_l3vpn_routes \n where peer_hash_id in ($peer_hash) \n ${prefix_clause:raw}\n limit $limit\n",
|
|
"refId": "A",
|
|
"select": [
|
|
[
|
|
{
|
|
"params": [
|
|
"value"
|
|
],
|
|
"type": "column"
|
|
}
|
|
]
|
|
],
|
|
"timeColumn": "time",
|
|
"where": [
|
|
{
|
|
"name": "$__timeFilter",
|
|
"params": [],
|
|
"type": "macro"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"title": "Current RIB State",
|
|
"transformations": [
|
|
{
|
|
"id": "merge",
|
|
"options": {
|
|
"reducers": []
|
|
}
|
|
}
|
|
],
|
|
"type": "table"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "postgres",
|
|
"uid": "obmp_postgres"
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"mode": "palette-classic"
|
|
},
|
|
"custom": {
|
|
"axisLabel": "",
|
|
"axisPlacement": "auto",
|
|
"barAlignment": 0,
|
|
"drawStyle": "line",
|
|
"fillOpacity": 10,
|
|
"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"
|
|
}
|
|
},
|
|
"decimals": 0,
|
|
"links": [],
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green",
|
|
"value": null
|
|
}
|
|
]
|
|
},
|
|
"unit": "none"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"gridPos": {
|
|
"h": 7,
|
|
"w": 12,
|
|
"x": 0,
|
|
"y": 6
|
|
},
|
|
"id": 1,
|
|
"options": {
|
|
"legend": {
|
|
"calcs": [
|
|
"max",
|
|
"mean",
|
|
"sum"
|
|
],
|
|
"displayMode": "table",
|
|
"placement": "right",
|
|
"showLegend": true
|
|
},
|
|
"tooltip": {
|
|
"mode": "multi",
|
|
"sort": "none"
|
|
}
|
|
},
|
|
"pluginVersion": "9.1.7",
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "postgres",
|
|
"uid": "obmp_postgres"
|
|
},
|
|
"format": "time_series",
|
|
"rawQuery": true,
|
|
"rawSql": "SELECT\n interval_time as time,\n sum(updates) as updates, sum(withdraws) as withdraws\nFROM stats_l3vpn_chg_byprefix s\nWHERE $__timeFilter(interval_time)\n AND peer_hash_id in ($peer_hash)\n ${prefix_clause:raw}\n\ngroup by interval_time\nORDER BY interval_time ASC\n",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "Prefix Advertisements & Withdrawals",
|
|
"type": "timeseries"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "postgres",
|
|
"uid": "obmp_postgres"
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"mode": "palette-classic"
|
|
},
|
|
"custom": {
|
|
"axisLabel": "",
|
|
"axisPlacement": "auto",
|
|
"barAlignment": 0,
|
|
"drawStyle": "line",
|
|
"fillOpacity": 10,
|
|
"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"
|
|
}
|
|
},
|
|
"decimals": 0,
|
|
"links": [],
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green",
|
|
"value": null
|
|
}
|
|
]
|
|
},
|
|
"unit": "none"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"gridPos": {
|
|
"h": 7,
|
|
"w": 12,
|
|
"x": 12,
|
|
"y": 6
|
|
},
|
|
"id": 2,
|
|
"options": {
|
|
"legend": {
|
|
"calcs": [
|
|
"max",
|
|
"mean",
|
|
"sum"
|
|
],
|
|
"displayMode": "table",
|
|
"placement": "right",
|
|
"showLegend": true,
|
|
"sortBy": "Total",
|
|
"sortDesc": true
|
|
},
|
|
"tooltip": {
|
|
"mode": "multi",
|
|
"sort": "none"
|
|
}
|
|
},
|
|
"pluginVersion": "9.1.7",
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "postgres",
|
|
"uid": "obmp_postgres"
|
|
},
|
|
"format": "time_series",
|
|
"rawQuery": true,
|
|
"rawSql": "SELECT\n interval_time as time,\n sum(updates) + sum(withdraws) as value,\n left(PeerName,32) as metric\nFROM stats_l3vpn_chg_byprefix s\n JOIN v_peers p ON (s.peer_hash_id = p.peer_hash_id)\nWHERE $__timeFilter(interval_time)\n AND s.peer_hash_id in ($peer_hash)\n ${prefix_clause:raw}\n\nGROUP BY s.interval_time,peername\nORDER BY interval_time ASC\n\n",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "Changes by Peer",
|
|
"type": "timeseries"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "postgres",
|
|
"uid": "obmp_postgres"
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"mode": "thresholds"
|
|
},
|
|
"custom": {
|
|
"align": "auto",
|
|
"displayMode": "auto",
|
|
"filterable": true,
|
|
"inspect": false
|
|
},
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green",
|
|
"value": null
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"overrides": [
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "lastmodified"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "unit",
|
|
"value": "time: YYYY-MM-DD HH:mm:ss.SSS"
|
|
},
|
|
{
|
|
"id": "displayName",
|
|
"value": "Last Modified"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Last Modified"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "custom.width",
|
|
"value": 208
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "event"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "mappings",
|
|
"value": [
|
|
{
|
|
"options": {
|
|
"Advertised": {
|
|
"color": "semi-dark-green",
|
|
"index": 0
|
|
},
|
|
"Withdrawn": {
|
|
"color": "semi-dark-red",
|
|
"index": 1
|
|
}
|
|
},
|
|
"type": "value"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "custom.displayMode",
|
|
"value": "color-background-solid"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"gridPos": {
|
|
"h": 20,
|
|
"w": 24,
|
|
"x": 0,
|
|
"y": 13
|
|
},
|
|
"id": 3,
|
|
"links": [],
|
|
"options": {
|
|
"footer": {
|
|
"fields": "",
|
|
"reducer": [
|
|
"sum"
|
|
],
|
|
"show": false
|
|
},
|
|
"showHeader": true,
|
|
"sortBy": [
|
|
{
|
|
"desc": true,
|
|
"displayName": "Last Modified"
|
|
}
|
|
]
|
|
},
|
|
"pluginVersion": "9.1.7",
|
|
"targets": [
|
|
{
|
|
"alias": "",
|
|
"datasource": {
|
|
"type": "postgres",
|
|
"uid": "obmp_postgres"
|
|
},
|
|
"format": "table",
|
|
"group": [],
|
|
"hide": false,
|
|
"metricColumn": "none",
|
|
"rawQuery": true,
|
|
"rawSql": " select lastmodified,event,routername,peername,prefix,nh,\n origin_as,localpref,med,as_path,extcommunities,communities,largecommunities\n from v_l3vpn_routes_history \n where $__timeFilter(lastmodified)\n AND peer_hash_id in ($peer_hash)\n ${prefix_clause:raw}\n \n order by lastmodified desc,id desc\n limit $limit;",
|
|
"refId": "A",
|
|
"select": [
|
|
[
|
|
{
|
|
"params": [
|
|
"value"
|
|
],
|
|
"type": "column"
|
|
}
|
|
]
|
|
],
|
|
"timeColumn": "time",
|
|
"where": [
|
|
{
|
|
"name": "$__timeFilter",
|
|
"params": [],
|
|
"type": "macro"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"title": "Prefix History",
|
|
"type": "table"
|
|
}
|
|
],
|
|
"refresh": "",
|
|
"schemaVersion": 36,
|
|
"style": "dark",
|
|
"tags": [
|
|
"obmp-nav",
|
|
"l3vpn",
|
|
"obmp-l3vpn"
|
|
],
|
|
"templating": {
|
|
"list": [
|
|
{
|
|
"current": {
|
|
"selected": false,
|
|
"text": "All",
|
|
"value": "$__all"
|
|
},
|
|
"datasource": {
|
|
"type": "postgres",
|
|
"uid": "obmp_postgres"
|
|
},
|
|
"definition": "select routername as __text, router_hash_id as __value from v_peers where recvcapabilities like '% afi=1 safi=128 %';\n",
|
|
"hide": 0,
|
|
"includeAll": true,
|
|
"label": "Router",
|
|
"multi": true,
|
|
"name": "router_hash",
|
|
"options": [],
|
|
"query": "select routername as __text, router_hash_id as __value from v_peers where recvcapabilities like '% afi=1 safi=128 %';\n",
|
|
"refresh": 1,
|
|
"regex": "",
|
|
"skipUrlSync": false,
|
|
"sort": 1,
|
|
"type": "query"
|
|
},
|
|
{
|
|
"current": {
|
|
"selected": true,
|
|
"text": [
|
|
"All"
|
|
],
|
|
"value": [
|
|
"$__all"
|
|
]
|
|
},
|
|
"datasource": {
|
|
"type": "postgres",
|
|
"uid": "obmp_postgres"
|
|
},
|
|
"definition": "select peername as __text, peer_hash_id as __value from v_peers where router_hash_id in ($router_hash) and recvcapabilities like '% afi=1 safi=128 %';",
|
|
"hide": 0,
|
|
"includeAll": true,
|
|
"label": "Peer",
|
|
"multi": true,
|
|
"name": "peer_hash",
|
|
"options": [],
|
|
"query": "select peername as __text, peer_hash_id as __value from v_peers where router_hash_id in ($router_hash) and recvcapabilities like '% afi=1 safi=128 %';",
|
|
"refresh": 1,
|
|
"regex": "",
|
|
"skipUrlSync": false,
|
|
"sort": 1,
|
|
"type": "query"
|
|
},
|
|
{
|
|
"current": {
|
|
"selected": false,
|
|
"text": "1000",
|
|
"value": "1000"
|
|
},
|
|
"hide": 0,
|
|
"includeAll": false,
|
|
"label": "Limit",
|
|
"multi": false,
|
|
"name": "limit",
|
|
"options": [
|
|
{
|
|
"selected": true,
|
|
"text": "1000",
|
|
"value": "1000"
|
|
},
|
|
{
|
|
"selected": false,
|
|
"text": "3000",
|
|
"value": "3000"
|
|
},
|
|
{
|
|
"selected": false,
|
|
"text": "5000",
|
|
"value": "5000"
|
|
},
|
|
{
|
|
"selected": false,
|
|
"text": "8000",
|
|
"value": "8000"
|
|
},
|
|
{
|
|
"selected": false,
|
|
"text": "10000",
|
|
"value": "10000"
|
|
}
|
|
],
|
|
"query": "1000,3000,5000,8000,10000",
|
|
"queryValue": "",
|
|
"skipUrlSync": false,
|
|
"type": "custom"
|
|
},
|
|
{
|
|
"current": {
|
|
"selected": false,
|
|
"text": "100.100.100.100",
|
|
"value": "100.100.100.100"
|
|
},
|
|
"hide": 0,
|
|
"label": "Prefix",
|
|
"name": "input",
|
|
"options": [
|
|
{
|
|
"selected": true,
|
|
"text": "100.100.100.100",
|
|
"value": "100.100.100.100"
|
|
}
|
|
],
|
|
"query": "100.100.100.100",
|
|
"queryValue": "67.211.53.0/24",
|
|
"skipUrlSync": false,
|
|
"type": "textbox"
|
|
},
|
|
{
|
|
"current": {
|
|
"selected": false,
|
|
"text": "",
|
|
"value": ""
|
|
},
|
|
"datasource": {
|
|
"type": "postgres",
|
|
"uid": "obmp_postgres"
|
|
},
|
|
"definition": "select CASE WHEN '$input' != '-' THEN 'AND prefix = ''' || (\n select prefix from l3vpn_rib \n where peer_hash_id in ($peer_hash) \n AND ('$rd' = '-' OR rd = '$rd')\n AND prefix >>= (CASE WHEN '$input' != '-' THEN '$input' ELSE '0/0' END)::inet order by prefix desc limit 1)::text || ''''\n ELSE '' END;",
|
|
"hide": 2,
|
|
"includeAll": false,
|
|
"multi": false,
|
|
"name": "prefix_clause",
|
|
"options": [],
|
|
"query": "select CASE WHEN '$input' != '-' THEN 'AND prefix = ''' || (\n select prefix from l3vpn_rib \n where peer_hash_id in ($peer_hash) \n AND ('$rd' = '-' OR rd = '$rd')\n AND prefix >>= (CASE WHEN '$input' != '-' THEN '$input' ELSE '0/0' END)::inet order by prefix desc limit 1)::text || ''''\n ELSE '' END;",
|
|
"refresh": 1,
|
|
"regex": "",
|
|
"skipUrlSync": false,
|
|
"sort": 0,
|
|
"type": "query"
|
|
},
|
|
{
|
|
"name": "rd",
|
|
"type": "query",
|
|
"label": "RD",
|
|
"description": "Route Distinguisher (VRF). Auto-discovered from l3vpn_rib; '-' = all VRFs.",
|
|
"datasource": {
|
|
"type": "postgres",
|
|
"uid": "obmp_postgres"
|
|
},
|
|
"query": "SELECT '-' AS rd UNION SELECT DISTINCT rd FROM l3vpn_rib WHERE iswithdrawn = false ORDER BY rd",
|
|
"definition": "SELECT '-' AS rd UNION SELECT DISTINCT rd FROM l3vpn_rib WHERE iswithdrawn = false ORDER BY rd",
|
|
"refresh": 1,
|
|
"includeAll": false,
|
|
"multi": false,
|
|
"current": {
|
|
"selected": true,
|
|
"text": "-",
|
|
"value": "-"
|
|
},
|
|
"options": [],
|
|
"sort": 1,
|
|
"hide": 0,
|
|
"skipUrlSync": false
|
|
}
|
|
]
|
|
},
|
|
"time": {
|
|
"from": "now-3h",
|
|
"to": "now"
|
|
},
|
|
"timepicker": {
|
|
"refresh_intervals": [
|
|
"5s",
|
|
"10s",
|
|
"30s",
|
|
"1m",
|
|
"5m",
|
|
"15m",
|
|
"30m",
|
|
"1h",
|
|
"2h",
|
|
"1d"
|
|
],
|
|
"time_options": [
|
|
"5m",
|
|
"15m",
|
|
"1h",
|
|
"6h",
|
|
"12h",
|
|
"24h",
|
|
"2d",
|
|
"7d",
|
|
"30d"
|
|
]
|
|
},
|
|
"timezone": "",
|
|
"title": "Prefix History (by Prefix) L3VPN",
|
|
"uid": "l3vpn-prefix-hist",
|
|
"version": 2,
|
|
"weekStart": ""
|
|
}
|