Skip to main content

1. Evolution of Digital Network Operations and Monitoring Challenges

Against the backdrop of high-density endpoint access and multi-service convergence in enterprise campus networks, network operations and maintenance (O&M) standards have shifted from basic connectivity to fine-grained, service-level observability. However, traditional SNMP polling faces significant challenges in modern network architectures. Its low collection frequency and coarse data granularity limit visibility. Frequent MIB tree traversal under large-scale concurrent requests can also significantly increase switch CPU utilization.

AsterNOS deeply integrates the standard SONiC monitoring architecture. Through direct access to the local in-memory database, it converts hardware status, port traffic, PoE power delivery, IP SLA link quality, and PTP metrics into standard time-series data that Prometheus can consume. This provides the underlying support for lightweight and efficient campus network O&M automation, including closed-loop fault detection, recovery, and self-healing.

2. Architecture and Core Mechanisms of Prometheus Exporter on SONiC

2.1 Data Presentation Architecture

Figure 1 - SONiC Prometheus Exporter Architecture

Exporter: The dedicated data adapter on an AsterNOS switch, responsible for data collection. It converts metrics from different internal targets into a standard data format that Prometheus can understand. The Exporter runs as an independent Docker container on the device being monitored and exposes an HTTP endpoint (http://localhost:9100/metrics). Prometheus periodically scrapes data from this endpoint.

Figure 2 - SONiC exporter installment as docker in Linux

Prometheus: The central data store and monitoring engine of the system, responsible for pulling and storing metrics. It actively and periodically scrapes data from the endpoints exposed by each Exporter and stores the data in its built-in time series database (TSDB) for efficient management. Once the Exporter addresses are defined in the Prometheus configuration file, Prometheus automatically starts collecting and storing the time series data.

Figure 3 - set ip address of exporter in prometheus config files

Grafana: The final presentation layer of the monitoring system, responsible for data visualization. It presents the large volume of data stored in Prometheus through clear and intuitive charts or tables. Grafana does not store data itself. It provides an interface for querying and visualizing data. Prometheus can be added as a data source, and PromQL queries can then be used to turn the relevant data into real-time, interactive dashboards.

Figure 4 - add prometheus as data source in grafana

2.2 Core Mechanisms of Prometheus Exporter

Unlike traditional monitoring methods that rely on protocol stack translation, the Exporter uses direct access to the local in-memory database, bypassing complex protocol conversion.

Traditional switch monitoring, such as SNMP-based monitoring or external MIB collection, requires multiple protocol layers for data encapsulation and translation. AsterNOS Exporter takes advantage of the database-centric architecture of SONiC. It connects directly to the switch’s local in-memory databases for fast metric collection.

  • Local Loopback Connection (Go-Redis Client): The Exporter runs as an independent Docker container on the switch. It connects to the local Redis in-memory database through 127.0.0.1:6379.
  • Direct Access to Multiple Database Instances: During operation, internal switch components write real-time status information to different Redis database instances. When the Exporter receives a Pull request from Prometheus, it queries the corresponding local database directly:

STATEDB: Reads protocol runtime and hardware status.
COUNTERSDB: Reads interface packet counters that change frequently.
CONFIGDB: Reads device configuration information.

3. Monitoring Capability Matrix

ModuleMetrics Collected
GeneralDevice Info
GeneralFAN RPM
GeneralDevice Up Time
GeneralCPU Usage
GeneralMemory Usage
GeneralSensor's Tempt
GeneralSensor's Tempt Threshold
GeneralPSU Input Current
GeneralPSU Output Current
GeneralPSU Input Volts
GeneralPSU Output Volts
GeneralPSU Input Power
GeneralPSU Output Power
MCLAGMclag Domain Operational Status
MCLAGMCLAG State Info
Network Time Protocol (NTP)NTP Sync Status
Network Time Protocol (NTP)NTP Jitter- Mean deviation in times between the switch and the NTP server
Network Time Protocol (NTP)Round-trip delay to the NTP server
Network Time Protocol (NTP)NTP Global
NTP GlobalNTP Offset- Time difference between the switch and the NTP server
NTP GlobalTime since last synchronized
Digital Optical Monitoring (DOM)Transceiver Info
Digital Optical Monitoring (DOM)DOM Optic Tx Power
Digital Optical Monitoring (DOM)DOM Optic Rx Power
Digital Optical Monitoring (DOM)DOM Optic Tempt
Digital Optical Monitoring (DOM)DOM Optic Voltage
Digital Optical Monitoring (DOM)DOM Bias Ampere
Critical Resource Monitoring (CRM)CRM STATS
InterfaceInterface Info
InterfaceTime since last flap of interface
InterfaceInterface Tx Packets
InterfaceInterface Rx Packets
InterfaceInterface Tx Bytes
InterfaceInterface Rx Bytes
InterfaceInterface Tx Buffer Drop Packets
InterfaceInterface Rx Buffer Drop Packets
InterfaceInterface Tx Drop Packets
InterfaceInterface Rx Drop Packets
InterfaceInterface Tx error packet
InterfaceInterface Rx error packet
InterfacePackets received on Ethernet
InterfaceSize of the Ethernet Frames transmitted
InterfaceInterface queue transmitted packets
InterfaceInterface queue transmitted bytes
InterfaceInterface egress queue dropped packets
InterfaceInterface egress queue dropped bytes
InterfaceInterface PoE Current (Amps)
InterfaceInterface PoE Voltage (Volts)
InterfacePoE Power (Watts)
VlanVlan Tx Packets
VlanVlan Rx Packets
VlanVlan Tx Bytes
VlanVlan Rx Bytes
VlanVlan Information
ACLACL Table Info
ACLACL Rule Info
ACLACL Packets
ACLACL Bytes
Static Anycast GatewaySAG Info
Static Anycast GatewaySAG Admin Status
Static Anycast GatewaySAG Operational Status
BGPBGP Status
BGPBGP Peer Uptime
BGPBGP Messages Tx from Peers
BGPBGP Messages Rx by Peers
BGPTotal BGP Prefixes Tx from Peers
BGPTotal BGP Prefixes Rx by Peers
OSPFOSPF Status
OSPFOSPF Neighbor Uptime
OSPFOSPF Neighbor RetxCounter
OSPFOSPF Neighbor Request Counter
OSPFOSPF Neighbor DBSummaryCount
EVPNStatus of the EVPN Endpoints
EVPNRemote Vteps Operational Status
EVPNNumber of remote VTEPs associated with VNI
EVPNNumber of ARPs cached for the VNI
EVPNNumber of L2 vnis associated with an L3 VNI
EVPNNumber of Mac Addresses learned VNI
SLATrack Table
SLARoute Tack table
SLASla table
PTPPTP Offset to Master
PTPPTP Path Delay
PTPPTP Instance Information
PTPPTP Port Information
PTPPTP sm_tlv Information
PTPPTP Gnss Information

4. Example Application Scenarios

Enterprise campus networks typically feature high-density endpoint access, redundant routing across multiple service gateways, and stringent time synchronization requirements in specific scenarios. By directly accessing the local Redis in-memory database, the Exporter enables end-to-end observability across multiple services, covering the physical layer, data link layer, routing layer, security policy layer, and high-precision time synchronization.

Figure 5 - sonic exporter application scenario

Grafana dashboard section list:

Figure 6 - Grafana dashboard sections list showing collapsible panels for General, NTP, Interface, BGP, EVPN, and other network metrics

Device Status:

Figure 7 - Grafana monitoring dashboard for SONiC switch, displaying real-time CPU utilization, memory usage, fan speed RPM, and LM75B temperature sensor data

Link Status:

Figure 8 - Grafana dashboard for SONiC switch interface monitoring, showing interface status table and traffic metrics including Tx Rx packets and bytes
Figure 9 - Grafana dashboard showing SONiC switch Digital Optical Monitoring-transceiver info table, plus TxRx optical power, temperature and voltage time-series charts

Protocol Status:

Figure 10 - Grafana dashboard for SONiC switch BGP monitoring, showing BGP peer status table, peer uptime, BGP message TxRx and advertised prefixes metrics
Figure 11 - Grafana dashboard showing Precision Time Protocol (PTP) performance metrics and instance tables

Ready to Implement?

Explore our detailed implementation guides to turn these white paper insights into real-world networking solutions. From RoCE to Zero-Touch Provisioning, we’ve got you covered.