Skip to content

telemetry/gnmi-writer: collect ISIS global state and overload bit#3714

Merged
snormore merged 6 commits into
mainfrom
snor/gnmi-writer-isis-global-state
May 19, 2026
Merged

telemetry/gnmi-writer: collect ISIS global state and overload bit#3714
snormore merged 6 commits into
mainfrom
snor/gnmi-writer-isis-global-state

Conversation

@snormore
Copy link
Copy Markdown
Contributor

Summary of Changes

  • Add isis_global_state extractor and ClickHouse migration capturing per-network-instance ISIS instance name, NET, and level capability from gNMI.
  • Add isis_overload_bit extractor and ClickHouse migration capturing the ISIS LSP overload bit per network instance.
  • Register both extractors in DefaultExtractors and define *_latest views (latest row per device) on each new table, matching the existing pattern for other gNMI-sourced tables.

Brings ISIS data collected by gnmi-writer closer to parity with the ISIS telemetry already shipped to S3, so we can eventually migrate ISIS consumers off the S3 pipeline onto this one.

Diff Breakdown

Category Files Lines (+/-) Net
Core logic 1 +72 / -0 +72
Scaffolding 3 +100 / -0 +100
Total 4 +172 / -0 +172

Pure addition: one extractor file with the new gNMI-walking logic, plus record structs and SQL migrations declaring the storage shape.

Key files (click to expand)
  • telemetry/gnmi-writer/internal/gnmi/extractors.go — adds extractIsisGlobalState and extractIsisOverloadBit and registers them in DefaultExtractors.
  • telemetry/gnmi-writer/internal/gnmi/records.go — adds IsisGlobalStateRecord and IsisOverloadBitRecord with their ClickHouse TableName() mappings.
  • telemetry/migrations/20250410000000_isis_global_state.sql — new isis_global_state table (30-day TTL, MergeTree) plus isis_global_state_latest view.
  • telemetry/migrations/20250410000001_isis_overload_bit.sql — new isis_overload_bit table (30-day TTL, MergeTree) plus isis_overload_bit_latest view.

Testing Verification

  • gnmi-writer unit tests and `go vet` pass on the affected package.
  • Migrations apply cleanly against a local ClickHouse via `RunMigrations`.

@snormore snormore force-pushed the snor/gnmi-writer-isis-global-state branch from 844710a to 4aa91ee Compare May 18, 2026 16:22
@snormore snormore force-pushed the snor/gnmi-writer-isis-global-state branch 2 times, most recently from 0ed9bff to 5f83869 Compare May 18, 2026 19:48
Comment thread telemetry/migrations/20260410000001_isis_overload_bit.sql Outdated
@snormore snormore force-pushed the snor/gnmi-writer-isis-global-state branch from 80f4077 to 836f6a2 Compare May 18, 2026 20:35
snormore added 6 commits May 19, 2026 11:14
…extractors

Build oc.Device fixtures in-test (vs. authoring prototext) and assert:
- isis_global_state pulls instance, NET (joined), and level capability per network instance
- isis_global_state skips entries with a nil Global.State
- isis_overload_bit reports OverloadBit=false when SetBit is nil or false, true when set
- isis_overload_bit skips entries with a nil OverloadBit.State
- TableName() returns isis_global_state / isis_overload_bit
Group isis_global_state_latest and isis_overload_bit_latest by
(device_pubkey, network_instance) so a row remains visible after the
device stops reporting that instance in a later scrape, instead of
disappearing the moment the device's max timestamp moves past it.

Add a SQL-only test that inserts two scrapes — the second omits one
network_instance — and asserts both rows still appear in the views.
… isis_overload_bit

Captures the Arista json_ietf_val format observed in production, including
the arista-isis-augments vendor field mixed in with openconfig leaves.
Covers unmarshal → extractor pipeline as a regression for the case where
the global/state and overload-bit paths were silently empty in
clickhouse.
@snormore snormore force-pushed the snor/gnmi-writer-isis-global-state branch from 499b751 to 27723d6 Compare May 19, 2026 15:16
@snormore snormore merged commit 4eed21e into main May 19, 2026
33 checks passed
@snormore snormore deleted the snor/gnmi-writer-isis-global-state branch May 19, 2026 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants