Architecture
The gnmi-exporter automates gNMI streaming telemetry collection from network devices managed by network-operator. It watches DeviceMonitor custom resources and Device objects to continuously reconcile the desired monitoring state.
How it works
- A user creates a DeviceMonitor CR specifying which devices to monitor (via label selectors) and which gNMI subscriptions to configure.
- The Reconciler watches both the DeviceMonitor CR and Device resources from network-operator. It reads device endpoint addresses and credentials from the Device specs.
- The operator creates and manages the following owned resources:
- RBAC (ServiceAccount, Role, RoleBinding) for the gNMIc pods
- Secret containing the generated gNMIc configuration (targets, subscriptions, outputs)
- StatefulSet running gNMIc instances that connect to devices and stream telemetry
- Services for gNMIc clustering and metrics exposure
- ServiceMonitor so Prometheus can discover and scrape the metrics endpoint
- The gNMIc pods establish gNMI Subscribe RPCs to the network devices and expose collected telemetry as Prometheus metrics.
- Prometheus Operator discovers the ServiceMonitor and scrapes
/metricsfrom the gNMIc pods, making the data available for dashboards and alerting.