Fix telemetry dashboard variables and parameterize gNMI targets
The telemetry dashboards' router/interface variables used a keep|distinct Flux pattern that returned only one source; switch to schema.tagValues so all streaming routers and interfaces are listed. Parameterize telegraf.conf gNMI addresses and credentials via GNMI_ADDRESSES/GNMI_USERNAME/GNMI_PASSWORD so the telemetry fleet can scale without editing the config. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
0732ebfa07
commit
a662496e53
@ -25,6 +25,13 @@ PSQL_MEM_LIMIT=6g
|
|||||||
PSQL_APP_MEM_LIMIT=4g
|
PSQL_APP_MEM_LIMIT=4g
|
||||||
KAFKA_MEM_LIMIT=4g
|
KAFKA_MEM_LIMIT=4g
|
||||||
|
|
||||||
|
# gNMI streaming telemetry (telegraf, test profile). GNMI_ADDRESSES is a
|
||||||
|
# quoted, comma-separated host:port list — add a router here once gNMI/grpc
|
||||||
|
# is enabled on it and the management path is reachable.
|
||||||
|
GNMI_ADDRESSES="10.100.0.100:57400", "10.100.0.200:57400"
|
||||||
|
GNMI_USERNAME=changeme
|
||||||
|
GNMI_PASSWORD=changeme
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
# ExaBGP route injector (test profile)
|
# ExaBGP route injector (test profile)
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
|
|||||||
@ -284,6 +284,11 @@ services:
|
|||||||
- influxdb
|
- influxdb
|
||||||
environment:
|
environment:
|
||||||
- INFLUXDB_TOKEN=openbmp-telemetry-token
|
- INFLUXDB_TOKEN=openbmp-telemetry-token
|
||||||
|
# gNMI fleet — quoted, comma-separated host:port list. Default = the two
|
||||||
|
# ESXi CORE routers; extend via GNMI_ADDRESSES in .env for more routers.
|
||||||
|
- 'GNMI_ADDRESSES=${GNMI_ADDRESSES:-"10.100.0.100:57400", "10.100.0.200:57400"}'
|
||||||
|
- GNMI_USERNAME=${GNMI_USERNAME:-webui}
|
||||||
|
- GNMI_PASSWORD=${GNMI_PASSWORD:-cisco}
|
||||||
|
|
||||||
# --- Phase 4: Traffic Generator ---
|
# --- Phase 4: Traffic Generator ---
|
||||||
|
|
||||||
|
|||||||
@ -48,7 +48,7 @@
|
|||||||
"multi": true,
|
"multi": true,
|
||||||
"name": "router",
|
"name": "router",
|
||||||
"options": [],
|
"options": [],
|
||||||
"query": "from(bucket: \"telemetry\")\n |> range(start: -1h)\n |> filter(fn: (r) => r._measurement == \"interface_counters\")\n |> keep(columns: [\"source\"])\n |> distinct(column: \"source\")\n |> sort()",
|
"query": "import \"influxdata/influxdb/schema\"\nschema.tagValues(bucket: \"telemetry\", tag: \"source\", predicate: (r) => r._measurement == \"interface_counters\", start: -1h)",
|
||||||
"refresh": 2,
|
"refresh": 2,
|
||||||
"regex": "",
|
"regex": "",
|
||||||
"type": "query"
|
"type": "query"
|
||||||
|
|||||||
@ -48,7 +48,7 @@
|
|||||||
"multi": true,
|
"multi": true,
|
||||||
"name": "router",
|
"name": "router",
|
||||||
"options": [],
|
"options": [],
|
||||||
"query": "from(bucket: \"telemetry\")\n |> range(start: -1h)\n |> filter(fn: (r) => r._measurement == \"interface_counters\")\n |> keep(columns: [\"source\"])\n |> distinct(column: \"source\")\n |> sort()",
|
"query": "import \"influxdata/influxdb/schema\"\nschema.tagValues(bucket: \"telemetry\", tag: \"source\", predicate: (r) => r._measurement == \"interface_counters\", start: -1h)",
|
||||||
"refresh": 2,
|
"refresh": 2,
|
||||||
"regex": "",
|
"regex": "",
|
||||||
"type": "query"
|
"type": "query"
|
||||||
@ -66,7 +66,7 @@
|
|||||||
"multi": true,
|
"multi": true,
|
||||||
"name": "interface",
|
"name": "interface",
|
||||||
"options": [],
|
"options": [],
|
||||||
"query": "from(bucket: \"telemetry\")\n |> range(start: -1h)\n |> filter(fn: (r) => r._measurement == \"interface_counters\")\n |> filter(fn: (r) => r.source =~ /${router:regex}/)\n |> keep(columns: [\"name\"])\n |> distinct(column: \"name\")\n |> sort()",
|
"query": "import \"influxdata/influxdb/schema\"\nschema.tagValues(bucket: \"telemetry\", tag: \"name\", predicate: (r) => r._measurement == \"interface_counters\" and r.source =~ /${router:regex}/, start: -1h)",
|
||||||
"refresh": 2,
|
"refresh": 2,
|
||||||
"regex": "",
|
"regex": "",
|
||||||
"type": "query"
|
"type": "query"
|
||||||
|
|||||||
@ -48,7 +48,7 @@
|
|||||||
"multi": true,
|
"multi": true,
|
||||||
"name": "router",
|
"name": "router",
|
||||||
"options": [],
|
"options": [],
|
||||||
"query": "from(bucket: \"telemetry\")\n |> range(start: -1h)\n |> filter(fn: (r) => r._measurement == \"interface_counters\")\n |> keep(columns: [\"source\"])\n |> distinct(column: \"source\")\n |> sort()",
|
"query": "import \"influxdata/influxdb/schema\"\nschema.tagValues(bucket: \"telemetry\", tag: \"source\", predicate: (r) => r._measurement == \"interface_counters\", start: -1h)",
|
||||||
"refresh": 2,
|
"refresh": 2,
|
||||||
"regex": "",
|
"regex": "",
|
||||||
"type": "query"
|
"type": "query"
|
||||||
@ -66,7 +66,7 @@
|
|||||||
"multi": true,
|
"multi": true,
|
||||||
"name": "interface",
|
"name": "interface",
|
||||||
"options": [],
|
"options": [],
|
||||||
"query": "from(bucket: \"telemetry\")\n |> range(start: -1h)\n |> filter(fn: (r) => r._measurement == \"interface_counters\")\n |> filter(fn: (r) => r.source =~ /${router:regex}/)\n |> keep(columns: [\"name\"])\n |> distinct(column: \"name\")\n |> sort()",
|
"query": "import \"influxdata/influxdb/schema\"\nschema.tagValues(bucket: \"telemetry\", tag: \"name\", predicate: (r) => r._measurement == \"interface_counters\" and r.source =~ /${router:regex}/, start: -1h)",
|
||||||
"refresh": 2,
|
"refresh": 2,
|
||||||
"regex": "",
|
"regex": "",
|
||||||
"type": "query"
|
"type": "query"
|
||||||
|
|||||||
@ -17,15 +17,16 @@
|
|||||||
# INPUT PLUGINS #
|
# INPUT PLUGINS #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
## CORE routers (directly reachable on port 57400 from host)
|
## gNMI targets — driven by environment variables so the telemetry fleet can
|
||||||
## R9K routers (10.100.0.1-7) are blocked by CML management network filtering
|
## scale without editing this file. Set in .env:
|
||||||
|
## GNMI_ADDRESSES — quoted, comma-separated host:port list, e.g.
|
||||||
|
## GNMI_ADDRESSES="10.0.0.1:57400", "10.0.0.2:57400"
|
||||||
|
## GNMI_USERNAME / GNMI_PASSWORD — gNMI credentials (uniform across the fleet)
|
||||||
|
## Every target must have gNMI/grpc enabled and be reachable on the gRPC port.
|
||||||
[[inputs.gnmi]]
|
[[inputs.gnmi]]
|
||||||
addresses = [
|
addresses = [ ${GNMI_ADDRESSES} ]
|
||||||
"10.100.0.100:57400",
|
username = "${GNMI_USERNAME}"
|
||||||
"10.100.0.200:57400"
|
password = "${GNMI_PASSWORD}"
|
||||||
]
|
|
||||||
username = "webui"
|
|
||||||
password = "cisco"
|
|
||||||
|
|
||||||
## No TLS (lab environment)
|
## No TLS (lab environment)
|
||||||
enable_tls = false
|
enable_tls = false
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user