Jan 12, 2026 · 13399 words · 63 min read

Observability#

A service provider’s core router had a fan module fail silently overnight, but no alerts were triggered. This issue cascaded internally. The thermal management subsystem on the line cards detected a high temperature and began throttling the forwarding ASICs to protect the hardware, and the throughput on a production transit link dropped by 40%.

The monitoring system saw nothing: the thermal sensors it polled were on the chassis supervisor rather than on the individual line cards. The Simple Network Management Protocol (SNMP) polls ran every five minutes and reported the device as healthy, and the interface counters showed less throughput, but it fell within normal behavior because no special threshold was configured for this pattern.

Three hours later, a customer opened a ticket complaining that the Service Level Agreement (SLA) was breached. The on-call engineer checked the monitoring and saw nothing. Next, they SSHed into the router, noticed the fan failure alarm, and power-cycled the fan module to solve the incident within minutes. The customer was notified, and the incident and SLA breach were documented, but the root cause was never confirmed.

By the time the network engineer investigated, the router had been running normally for hours. There was no thermal data for the line cards or any record of the throttling event that could correlate the throughput reduction with the fan failure. The incident report concluded: “suspected hardware issue, resolved by hardware reset.”

It happened again four months later on a different router (the story always repeats; it may just take longer).

The failure was not a missing threshold. The failure was incomplete coverage. The monitoring system did not collect all the data needed to detect the issue because thermal data from line cards was available only via gRPC Network Management Interface (gNMI). Nobody had configured the collection path because nobody had written a runbook for fan failures.

Traditional network monitoring watches for broken things: is the interface up? Is the Central Processing Unit (CPU) over 90%? Is this service responding? That is useful, but it is reactive: you are watching for failure.

Observability is different. It is about understanding why things break or are about to break. It is not just “that device is down” but “why is it down, what breaks because it’s down, what’s the business impact.” With network automation, observability becomes the feedback loop: you observe something, your system detects it, decides how to respond, takes action, and verifies the fix worked. That is a closed loop: Chapter 16 builds it to keep the configuration equal to intent, and Chapter 17 extends it to keep the service healthy.

This chapter covers how to see what is happening in your network: which data to collect and how, how to store it and alert on it, and how to show it to people so they can decide. It also covers the part most teams skip, watching the automation system itself, which is where failures go silent.

We cover two building blocks here: Collector and Observability, because they are tightly connected.

This chapter is heavily influenced by the book Modern Network Observability (Packt), which I coauthored with David Flores and Josh VanDeraa. If you want to go hands-on and learn an implementation with the Telegraf-Prometheus-Grafana (TPG) stack and other tools, I definitely recommend it. At AutoCon5, David and I also presented Rethinking Network Monitoring, a session available on YouTube that complements this chapter.

The vendors and products named in this chapter are examples, not recommendations. They illustrate a category; the right choice for your network depends on the factors this chapter works through.

Fundamentals#

You cannot manage what you cannot measure.

You probably already monitor your network. You use SNMP, you look at System Logging Protocol (Syslog), you have dashboards showing link utilization. That is monitoring: it tells you if things are working.

But network automation needs something else. When your network changes (maybe because automation changed it), you need to know immediately if it breaks something. When you get an alert, you need context: which customers does this affect? Which services failed? What is the blast radius? Monitoring tells you something is wrong, but to automate, we need to know what, where, and who is affected. Measuring is the easy half. The Observability block enables context-aware network automation.

Here is the key difference:

  • Monitoring: Is the interface up? Is the CPU high? Simple yes/no questions.
  • Observability: Why did the interface go down? What is it impacting? How do we fix it automatically? What happened historically that led to this?

Whether you buy one product or assemble your own stack, the underlying architecture is the same, and this chapter’s patterns apply to both. The first choice is how the observability system runs:

  • Monolithic (e.g., SolarWinds, LibreNMS): One product does everything. You install it, configure it, and go. Good if your network is straightforward and you do not have DevOps experience. Bad if you want flexibility or your network is unusual: you are stuck with their model.

  • Cloud SaaS (e.g., Datadog, New Relic, Kentik): They run everything for you. Fast to deploy, no infrastructure headaches, beautiful dashboards out of the box. But you are paying monthly based on volume, your data lives on their servers (matters for some compliance regimes), and when you hit their limits, you are stuck. I have seen teams spend $50K/month on observability SaaS wondering why their CFO is unhappy.

  • Build-it-yourself (e.g., Prometheus + Grafana, or the TPG stack): Total flexibility, no vendor lock-in, better economics at scale. But you are now running databases, message queues, and collector infrastructure. If you do not have people who can operate this stuff, you will spend more time fixing observability than fixing your network.

The real question: Do you have the team to run it? If yes, build it. If no, buy it. Do not fool yourself about which category you are in.

After that choice, two more questions come up:

  • Where does it run? On your premises (you control everything, but you run it), in the cloud (they run it, but your data leaves your network), or hybrid (some places local, some places cloud)?
  • What is the cost model? Per device? Per metric ingested? Flat subscription? These decisions add up fast when you are collecting millions of data points per minute.

Evolving from what you already run

Nobody starts from nothing. You have a Network Management System (NMS), years of SNMP polling, a wall of thresholds somebody tuned years ago, and a Network Operations Center (NOC) trained on one specific console. The architecture in this chapter is the destination, not the first step, and the migration is where the risk lives.

Run both for a while. The old system keeps alerting while the new pipeline earns trust, and a parallel period of a few months is normal. What keeps it finite is deciding up front what “earned” means: the new pipeline catches the same incidents, with fewer false positives, over a defined window.

Move in this order, because each step makes the next one cheaper:

  1. Dynamic inventory first. Point the new collection at the Source of Truth (SoT) instead of a hand-maintained list. Even if nothing else changes yet, you stop missing new devices.
  2. One data type, one use case. Interface counters for capacity, or Border Gateway Protocol (BGP) session state for one service. A narrow slice proves the whole pipeline end-to-end: collection, normalization, storage, alerting, dashboard.
  3. The alerts that actually require action. Port the rules that wake somebody up, not the four thousand that never fire. Most thresholds in an old system have never fired or never been acted on, and migration is the cheapest moment to delete them.
  4. The long tail, or never. Some of what the old system does is needed once a quarter. Leaving it there for another year is a legitimate decision.

The old system gets switched off when nobody has looked at it for a month, not when the project plan says so.

The observability system needs to solve several things:

  1. Observe everything automatically. New device connects? It should start reporting data without someone manually registering it. New service comes online? It is already being watched. This requires integration with your Source of Truth so observability knows what exists.

  2. Handle heterogeneous environments with good data. Your network probably has devices from several vendors, cloud providers, Linux servers, and containers. Each one has different ways to expose data. And forget 5-minute intervals: you need near-real-time data when automation is making changes.

  3. Correlate data across layers. A server is slow. Is the network congested, or is it a database issue? You need data from network devices, servers, applications, all speaking the same language so you can draw lines between them.

  4. Scale without melting. Networks grow. When you are collecting a million metrics per second, traditional architectures crumble. You need systems designed for scale from day one.

  5. Let people analyze the data intelligently. Give analysts access to query your data via powerful queries so they can answer their own questions without relying only on pre-built dashboards. And they need both real-time data and history (trends, anomaly detection).

  6. Detect problems and trigger the fix automatically. Most of the time, your automation should respond to issues without waiting for a human. Only when automation cannot figure it out should someone get paged. And that alert should explain what is wrong.

  7. Show people what they need to see. A dashboard is worthless if it shows too much or the wrong stuff. Give the network ops team their view, the business their view, the engineers their view. Each person gets what helps them do their job.

Finally, before detailing the seven functionalities that make these goals possible, here is what falls within Observability’s scope.

What is in scope

Observability explains what the network is doing. It does not decide what the network should be, and it does not change it.

The block owns observed state: the record of what the network is actually doing, along the whole path from a counter on a device to a dashboard somebody acts on. Collection, normalization, distribution, storage, analysis, alerting, and the views on top. Three parts of that are easy to overlook:

  • Observation at several levels, so the same underlying data answers a technical, an operational, and a business question.
  • Feedback into CI/CD pipelines, so automated testing and post-change validation have real data to check against.
  • Observability of the automation system itself: the Collectors, processors, and alerting are production services, and they need monitoring like any other.

What is out of scope

  • Defining network intent: What the network should look like (Intent/SoT responsibility)
  • Executing network changes: Actually implementing remediation (Executor responsibility)
  • Orchestrating workflows: Coordinating multi-step remediation (Orchestrator responsibility)

Functionalities#

Seven functionalities deliver those seven goals, one each, as Figure 7.1 shows.

Observability goals

Figure 7.1: The seven observability goals, and the functionality that delivers each one.
  1. Inventory: Knows what to observe. It consumes devices, services, and credential references from the Source of Truth and hands every downstream component its targets and metadata. Add a device to the SoT and its monitoring comes online without anyone registering it.

  2. Collector: Retrieves observed data from the network, both pull-based (polling) and push-based (streaming). SNMP for older equipment, gNMI streaming for modern devices, syslog for events, flows such as NetFlow and IP Flow Information Export (IPFIX) for traffic, packet captures for deep troubleshooting. Different speeds, different richness, and you do not have to pick just one.

  3. Processor: Normalizes heterogeneous data into one schema and enriches it with context. One vendor’s metrics look nothing like another’s, logs arrive as unstructured text, and flows arrive as binary. The processor translates all of it into a common language and attaches which device, which customer, and which service each value belongs to.

  4. Distribution: Moves data and events reliably from Collectors through processors to persistence and alerting. A sequential pipeline becomes the bottleneck at scale, so this is where message buses and streaming platforms decouple each stage and let them scale independently.

  5. Persistence: Stores the normalized data where it can be ingested, retained, and queried at scale. Metrics want a time-series database, logs want something else, and both have to answer queries across millions of points in milliseconds. Not all databases are equal here.

  6. Alerting and Analytics: Turns data into action. Raw metrics trigger nothing on their own, so rules and thresholds detect the conditions you care about and emit events. If CPU is over 90%, check whether a maintenance window explains it; if not, hand the event to the Orchestrator or page someone.

  7. Visualization: Renders the data and the events into dashboards and reports, tailored per audience. Data nobody looks at is wasted, and a dashboard that shows everything shows nothing: each audience gets the view that answers its own questions, able to drill down and to compare against history.

The functionalities can be seen in the form of a data pipeline, or Extract, Transform, Load (ETL), as Figure 7.2 shows:

Observability stack

Figure 7.2: The observability data pipeline, an architectural view.

Those two figures are the map for the rest of the chapter. Each functionality gets its own section, in pipeline order, starting with the one that handles no observed data at all: working out what to observe in the first place.

Inventory#

The first question for the Observability block is what should be monitored.

You already have this data somewhere: it is the inventory in your Source of Truth. You have got device names, service identifiers, Internet Protocol (IP) addresses, what they are, whether they are active, credentials. Do not duplicate that by hand. Pull it in automatically.

What you need from your SoT:

  • A unique name or ID for each device or service (so you know it is the device you think it is)
  • How to reach it: IP address, hostname, and credentials (if you need to actively pull data from it)
  • What it is: the type and vendor (so you know which Collectors work with it)
  • Whether it is active: if it is planned, active, or being decommissioned (so you do not alert on expected downtime)

Beyond the basics, you might also care about:

  • OS or device specifics: some devices use different protocols, some are old and need special handling
  • Context: who owns it, where it is located, which customers depend on it (useful for filtering alerts and dashboards)

Why automate this instead of building a list by hand? Because people forget to update lists. Devices get added, nobody tells monitoring, and suddenly you are missing visibility. But if observability reads from your SoT, when you add a device there, it is automatically being monitored.

To get this inventory data, you have two basic patterns:

  • Pull: Observability checks the SoT periodically for updates. Simple, but if something changes mid-interval, you miss it.
  • Push: When the SoT changes, it signals observability automatically (webhooks, message bus). Faster and more reliable, but usually a bit more complex because you need adjustments on both sides.

A third pattern sits between those two: a dynamic inventory service such as Consul or etcd. The SoT writes targets into a key-value store, each collector watches the keys it cares about, and a change reaches the collectors in seconds without either side knowing about the other. Prometheus-style service discovery reads this kind of store directly, which is why it is the common pattern in container-era stacks, and it applies just as well to traditional networks. It buys a network team two things: collectors can restart or scale out without re-reading the whole SoT, and a collector that loses the store keeps running on its last known target list.

If you have good data in your SoT and real integration (not manual copy-paste), inventory becomes automatic and you never miss observing a new device.

After the targets are defined, it is time to collect operational data.

Collector#

Your data has to come from somewhere. Collectors are the bridges between your network and your observability system. They are responsible for pulling (or receiving) data from your devices and feeding it into the pipeline. Without effective collectors, everything downstream is garbage.

There are two fundamental approaches from the perspective of who owns the data flow:

  • Passive or Push: Your devices send data to the collector. Think syslog servers receiving log messages from routers, or IPFIX collectors listening for flow records. The device decides what to send and when.
  • Active or Pull: The collector asks devices for data. It connects to each device and pulls information using SNMP, gNMI, or Representational State Transfer (REST) Application Programming Interfaces (APIs). The collector is in control: it decides what to ask for and when.

Dial-in streaming sits across both. The collector initiates the subscription, then the device pushes until it is told to stop, so neither bullet describes it on its own. The streaming telemetry pattern below covers it.

You can also categorize collectors by deployment style:

  • Agentless: No software to install on devices. A central collector server (usually running somewhere else) connects to each device individually. Simple to start with, but can become a bottleneck as you scale.
  • Agent-based: Install a small agent on each device or service. Agents push data to a central location, or pull directly from local sources. More distributed, easier to scale, but more moving parts to manage.

Regardless of the collection method, it is important to highlight the different types of data that may be of interest in the network automation environment. I classify it into four broad categories, shown in Figure 7.3:

Collector Scope

Figure 7.3: The scope of the Collector.
  • Management plane: Device state, configuration, logs, and statistics. Protocols in this group are SNMP, syslog, gNMI, NETCONF, and RESTCONF.
  • Control plane: Where the protocols that build the forwarding tables run, such as Open Shortest Path First (OSPF), Intermediate System to Intermediate System (IS-IS), and BGP. You observe it through protocol state (sessions, neighbors, routing tables) and through telemetry built for it, such as BGP Monitoring Protocol (BMP).
  • Forwarding plane: This plane is where the packets are moved (e.g., network interfaces), and it is the most demanding in terms of data volume and velocity. Observing it must not get in the way of forwarding packets. In this group are active probes such as ping and traceroute, and tools such as tcpdump, IPFIX, sFlow, NetFlow, IP SLA, Packet Sampling (PSAMP), and Extended Berkeley Packet Filter (eBPF).
  • External data: This category includes everything that is not network device-specific. For instance, circuit provider information and the contact for a given interface, coming from an external asset manager system or physical Internet of Things (IoT) sensors, could fit into this broad field.

Observation is not free. It costs the device, and it costs the network. Start with the device. Every poll and every subscription costs the device something, and the budget you are spending is the control plane you are trying to protect. Walking a large routing or Address Resolution Protocol (ARP) table can pin a supervisor CPU for the duration of the walk. A subscription at 100 ms consumes memory and processing on the box for as long as it runs. Even a steady 48 ports by 8 metrics every 30 seconds is load the device feels when nothing is wrong at all.

Figure 7.4 shows the trade-off for one fleet-wide polling interval. The curves are illustrative.

Polling interval against device cost

Figure 7.4: Polling interval against device cost.

Treat collection as load you are adding to a production system. Measure device CPU before and after enabling a new collection path, and stagger polling so hundreds of devices are not answering in the same second. Take sub-second data only from the handful of interfaces that need it. For state that changes rarely, such as BGP sessions or interface status, subscribe on change instead: the device sends only when the value moves, which is the flat dotted line in Figure 7.4. The failure mode is specific and familiar, which is monitoring that causes the incident it was installed to detect.

The network pays too. Telemetry is heaviest when something is wrong and everything reports at once. Prefer an out-of-band management network for collection wherever you have one: it keeps telemetry off the data path, and it is the only way an alert about a congested fabric escapes the congested fabric. And at high volume, consider a network dedicated to telemetry, or at minimum a Quality of Service (QoS) class for it, so the data describing an outage is not the first thing dropped during one. Where everything shares a single path, say so explicitly in the design and accept that your observability degrades along with the network it is watching.

These four categories end up mapping to two core questions:

  • What to collect: Metrics? Logs? Flow records? Each has different data models. SNMP has Management Information Bases (MIBs), modern gear exposes Yet Another Next Generation (YANG) models over gNMI, applications use OpenTelemetry. The dream is a universal standard that lets you correlate data across everything, but that does not exist yet. So you might need to build your own translation layer that turns all these different formats into something consistent (which is what the processing layer does next).
  • How to get it: Which protocol? SNMP is old but stable, gNMI is modern and pushes data at you continuously, IPFIX captures what is flowing. It varies by what you are trying to observe.

Table 7.1 summarizes what you might collect and the tools available:

Data TypeProtocols / Collection MethodsNotes / Examples
MetricsSNMP, HTTP and CLI scraping, OpenTelemetry (OTLP), gNMI streamingDevice metrics, host metrics, application metrics
LogsOTLP, file tailing, syslogApplication logs, system logs, structured logs
TracesOTLPDistributed tracing across services
Network FlowsNetFlow, IPFIXTraffic flows, source/destination analysis
Protocol-specificBMP, BGP, ARP, OSPFBGP monitoring (BMP), ARP tables, BGP tables, OSPF tables
Packet CapturesPCAP (libpcap), SPAN / TAPFull packet inspection, deep troubleshooting
Table 7.1: Data types and how to gather each.

CLI scraping is fragile (vendors change output format), slow (screen scraping and parsing text is expensive), unreliable (random command timeouts), and scales terribly. If your device is so old it only has CLI, either replace it or accept that you will have limited observability. Do not build your entire monitoring stack around the lowest common denominator.

The key point is that before you decide what to collect, you start with the problem you are trying to solve. That decision drives everything else. Are you detecting interface saturation? Monitoring BGP convergence? Tracking DDoS traffic? Your problem determines what data you need and how often you need it.

A few patterns have gained adoption recently, either to collect more often or to converge collection methods:

Streaming telemetry

Devices push data continuously using YANG models. You set up subscriptions and data flows in real time. It comes in two flavors, shown in Figure 7.5:

Streaming Telemetry

Figure 7.5: Streaming telemetry: dial-in versus dial-out.
  • Dial-In: The collector asks the device to start streaming (collector initiates).
  • Dial-Out: The device is pre-configured to stream to you (device initiates).

Much lower latency than polling, and the device stays in control of the flow.

Not every protocol that can stream does it the same way, and the differences decide how you design subscriptions:

  • gNMI defines the subscription model most network engineers mean by streaming telemetry. A subscription runs in one of three modes: ONCE (one set of updates, then the RPC closes), POLL (a long-lived RPC where the client asks when it wants data), and STREAM (long-lived, the target keeps sending). Inside a STREAM subscription, each path chooses SAMPLE (one update per sample interval), ON_CHANGE (an update only when the value changes), or TARGET_DEFINED (the device decides per leaf).
  • NETCONF with YANG-Push is the IETF equivalent. RFC 8639 defines subscriptions to YANG notifications and RFC 8641 extends them to datastore updates, with the same two triggers, periodic and on-change, plus a dampening period that bounds how often an on-change subscription may fire.
  • OpenTelemetry Protocol (OTLP) also streams, but it is not a subscription mechanism: nobody asks for a path. An agent pushes telemetry it has already gathered, and that agent can run on the device itself or on a collector next to it. Either way it sits downstream of the two above, and the OpenTelemetry discussion below develops it.
  • Flow and event exports (IPFIX, sFlow, BMP, syslog) are push by nature. There is no subscription to negotiate: you configure the device to send, and the collector listens.

One thing to know before you design around the figure above: dial-out is not part of the gNMI specification. The spec defines dial-in and lists dial-out as a future item, so every dial-out implementation you meet is vendor-specific. Instead of adding a dial-out mode to gNMI, OpenConfig defined a generic gRPC Remote Procedure Call (gRPC) tunnel. Check what your platforms actually support before assuming the pattern is portable.

Within the streaming telemetry realm, push the sample interval far enough down and it answers a question polling cannot reach at all. This is what high-frequency telemetry (HFT) is about. A microburst is a traffic spike lasting from microseconds to a few milliseconds: long enough to fill a queue and drop packets, short enough that a five-minute average still shows the link at 30% utilization. The customer sees loss, the dashboard shows headroom, and the argument that follows is familiar to anyone who has run a data center fabric.

Catching it takes one of two things. A sub-second sample interval, with 100 ms a common choice, catches the longer bursts in its counters. Hardware-level export from the ASIC catches the rest: the switch records queue depth at a granularity no subscription could carry. Both have become ordinary requirements in Artificial Intelligence (AI) training fabrics, where incast from synchronized workers is the normal traffic pattern.

The cost is volume, and it is not subtle: moving from a 5-second to a 100 ms interval multiplies the data by 50. So high-frequency telemetry is almost always paired with filtering at the collector and aggregation close to the device, both covered later in this section. Sample at 100 ms on the interfaces where microbursts matter, not on all of them. And, as the Persistence section covers, use downsampling for long-term analysis.

HTTP-exposed metrics

HTTP scraping (pull-based metrics) is simple and scales well. SNMP works this way too, but the interesting development is narrower than it is often described: Linux-based network OSes let you run a Prometheus exporter on the switch itself. Metrics then arrive over HTTP, in a format your systems-monitoring stack already speaks, with no MIB parsing in between. Table 7.2 lists where these metrics come from.

SourceExposed byExample metric (interface traffic)
NVIDIA Cumulus Linuxnode_exporter, which you install yourself, as on any Debian hostnode_network_receive_bytes_total{device="swp1"} 9.21e+10
SONiCone of several exporters installed on the switch, such as node_exporternode_network_receive_bytes_total{device="Ethernet0"} 1.234e+12 (with node_exporter)
Arista DANZ Monitoring Fabricthe DMF controller, on /api/v1/metrics/prometheus, not the switch OSdevice_interface_in_octets_total
Table 7.2: Where Prometheus-format metrics come from, and what exposes them.

Note the third row: the controller exposes the metrics, not the switch OS. For Arista EOS switches outside such a fabric, the usual path to Prometheus-format data is a collector pointed at gNMI, which is the streaming telemetry pattern above. Check what your own platforms expose before designing around this, because the gap between “the Network Operating System (NOS) is Linux” and “the NOS ships an exporter” is where plans go wrong.

HTTP-exposed metrics make life much easier for the many infrastructure teams that already converge systems monitoring on Prometheus, because network data arrives in a format their stack already speaks.

The scraping approach provides low latency and near-real-time metrics, rich labels, and pull-based collection (central control of rate/timeout), connecting well with cloud-scale observability.

OpenTelemetry

OpenTelemetry is a vendor-neutral standard and toolkit for collecting, processing, and exporting telemetry data. It gives metrics, logs, and traces one common language and pipeline across networks, systems, and applications.

It does not replace network protocols like SNMP, NetFlow, gNMI, or BMP. Instead, it standardizes how telemetry is represented and transported after collection.

In traditional network monitoring, the data models are diverse and use vendor-specific schemas and naming, which makes it hard to correlate across layers (network ↔ system ↔ application). In contrast, OpenTelemetry helps by providing:

  • A common data model for metrics, logs, and traces
  • A standard transport protocol (OTLP), over gRPC or HTTP
  • A single processing pipeline for multiple signal types

The network side of OpenTelemetry is still being written. The semantic conventions for network hardware metrics define names such as hw.network.io, hw.network.packets, and hw.network.bandwidth.utilization, but every one of them is still marked Development. Treat them as a direction of travel rather than a contract: the names can still change, and almost no network device emits them natively today.

The reference implementation is the OpenTelemetry Collector, which receives, processes, and exports telemetry in a vendor-neutral way. Grafana Alloy and Telegraf are alternatives that speak OTLP alongside their own ecosystems. All three collect from different exporters and write to different backends: metrics into Prometheus-compatible Time Series Databases (TSDBs), logs into Loki, Elasticsearch, or ClickHouse, and traces into Tempo or Jaeger.

Adopting OpenTelemetry is not just a tooling decision: it is an architectural decision about how you unify your observability pipeline. The choice is between two approaches:

  • Protocol-native: each signal type travels through its native protocol end-to-end (gNMI to Prometheus, syslog to Elasticsearch, NetFlow to ClickHouse). Each pipeline is optimized for its signal. The cost is multiple independent pipelines with no shared data model, making correlation across signal types expensive.

  • OTel-native: signals are converted to OTLP as early as possible and flow through a single pipeline to a unified backend. Correlation across metrics, logs, and traces is natural because they share a data model. The cost is that network device OTel support is still maturing: most vendors do not emit OTLP natively, requiring an adapter layer (gNMI to OTel, SNMP to OTel) that adds operational complexity.

The practical recommendation today: adopt OTel for application-adjacent signals where vendor support is strong, such as telemetry from the Network Automation Platform (NAP) itself, service health, and structured application logs. Keep protocol-native pipelines for traditional network telemetry (SNMP polling, gNMI streaming) until device-side OTel support matures. Design the pipeline to run both side by side. Forcing one standard now means an adapter for every network platform integration.

OpenTelemetry is also one answer to a question the Processor has to settle anyway: what common model the pipeline normalizes into. Where OTel conventions exist for your signals, adopt them. Where they do not, define your own model, as the Normalization section describes, and keep it close enough to OTel that you can converge later.

OpenTelemetry is likely to become the common format. Starting with it for the NAP itself, the meta-monitoring covered later in this chapter, is a low-risk first step that builds familiarity before extending it to network devices.

Most collectors share the same structure: input, processor, and output stages.

Collector Architecture#

Every collector can be broken down into three parts (in some collectors these are pluggable, in others hardcoded). Figure 7.6 shows them.

Collector Architecture

Figure 7.6: The three stages of a collector: input, processor, and output.
  • Input: Defines what has to be observed and under which parameters.
  • Processor: Optional, but worth doing early, so the data has a consistent structure from the start. The processing could become very complex and may impact performance at scale, so not all processing has to be done at this level. The Processor functionality, the next section, covers where else it can run.
  • Output: Defines how the collector moves the data into the pipeline. It may send it directly to other blocks like processing or persistence, or use the distribution component to scale.

There are many collectors (each one with different capabilities) such as Telegraf, Grafana Alloy, gNMIc, pmacct, GoFlow2, etc., but they use a similar architecture. The “complete” network observability solutions, such as SuzieQ and Kentik, also implement built-in collectors for the data they cover. So when choosing one, and sometimes you need several, weigh four things:

  1. Device capabilities: what protocols do your devices support?
  2. Data volume: high volume needs streaming; low volume can use polling.
  3. Latency requirements: near real time or traditional intervals.
  4. Team skills and ecosystem fit with your backend.

Where to start, if you are starting now. Everything above is a catalog, not a to-do list. Start from the most capable thing each platform supports and work down:

  1. Streaming telemetry wherever it exists. A gNMI subscription, YANG-Push over NETCONF, or an on-box exporter scraped over HTTP all give you structured data at intervals measured in seconds instead of minutes, and the first two can also send on change.
  2. Flow export when you need to know who uses the capacity. “Who is using this capacity” is a different question from “how much is being used”, and no interface counter answers it.
  3. SNMP only for the devices that offer nothing better. It is a compatibility floor rather than a design choice. Building the pipeline around it means designing for your weakest input and retrofitting everything else later.
  4. CLI scraping as the last resort. At that point you are really choosing between a hardware refresh and accepting that part of the fleet stays dark.

Everything else this section covered, such as packet capture, eBPF, and sub-second telemetry, is a specialized answer to a specialized question: adopt it when you have the question, not because it appeared in this chapter.

The collector’s own processing stage introduces the next functionality: the Processor, which manipulates data at several points in the pipeline.

Processor#

Raw data from collectors is messy. Different devices export metrics differently, logs are unstructured text, values might be in different units. The processor layer cleans this up and makes it useful.

Goal: The data, as soon as it is received, must adhere to shared standards to converge signals from multiple sources, correlate them, and enrich them with additional context. Without this processor step, observability pipelines quickly become fragmented (difficult to query) and expensive to operate. There are multiple opportunities to process it depending on scale, complexity, and operational requirements.

These processors may be run at different stages of the observability pipeline, depending on the use case:

  • Embedded in the Collector: Best for lightweight, early normalization and filtering
  • Dedicated processor: Required at scale for dynamic enrichment and complex transformations
  • Persistence layer: Suitable for recording rules and long-term rollups (normalization should always happen before this)
  • Alerting layer: Derives events from stored data and applies business logic

The following are common processing actions that apply to observability pipelines.

Normalization#

Data comes in different formats. One vendor’s metrics look nothing like another’s, syslog is text, NetFlow is binary. Normalization translates all of this into a common format so your backend does not have to understand 50 different dialects.

Normalization comes down to two actions: enforcing a data structure, and aligning the names different sources use for the same entity, such as a device, an interface, or a metric.

There is a third alignment that is easy to forget, and it is time. Every correlation in this chapter assumes a timestamp from one device means the same instant as a timestamp from another. That holds only if the fleet is synchronized and the pipeline is explicit about which clock it trusts. Keep Network Time Protocol (NTP) healthy and monitored, and store everything in UTC. Then decide whether a record carries the device’s timestamp or the collector’s: the two differ by the collection delay, and mixing them silently skews every later comparison. A device whose clock has drifted by two minutes raises no error. It produces a wrong correlation, and nothing flags it.

Structuring

Devices emit data in ways that make sense for them. Your job is to translate that into a format that works for analysis. For example:

  • Log-based: parsing unstructured text into structured data.

    Mar 18 14:22:11 leaf01 IFACE-5-STATE: swp1 oper-state changed from UP to DOWN

    to

    {
      "timestamp": "2026-03-18T14:22:11Z",
      "level": "NOTICE",
      "device": "leaf01",
      "component": "interface",
      "event": "oper_state_change",
      "interface": "swp1",
      "previous_state": "UP",
      "current_state": "DOWN"
    }
  • Metric-based: enforcing a consistent syntax, for example, Prometheus format: <metric name>{<labels>} <value>

    interface_admin_state{hostname="leaf01", ifname="swp1"} 1
    interface_oper_state{hostname="leaf01", ifname="swp1"} 0
    interface_speed_bps{hostname="leaf01", ifname="swp1"} 100000000000
    interface_in_errors_total{hostname="leaf01", ifname="swp1"} 0
    interface_out_errors_total{hostname="leaf01", ifname="swp1"} 12
  • Table-based: some tools (e.g., SuzieQ) organize data into tabular, time-indexed state views:

    | hostname | ifname | adminState | operState | speed | inErrors | outErrors |
    |----------|--------|------------|-----------|-------|----------|-----------|
    | leaf01   | swp1   | up         | up        | 100G  | 0        | 0         |
    | leaf01   | swp1   | up         | down      | 100G  | 0        | 12        |

Renaming and alignment: Different telemetry sources describe the same concept using different names, paths, and label conventions or values. For example, operational status:

- OpenConfig: /interfaces/interface/state/oper-status value: UP tags: source=192.0.2.1 and interface_name=eth1
- SNMP: ifOperStatus{ifName="GigabitEthernet0/1", device="router01"} 1
- Native Prometheus: interface_oper_state{interface="swp1", host="leaf01"} 1
Listing 7.1: Different data models for operational state.

Normalization aligns them into a consistent model, including the object name, label renaming, and the value (using the same unit conversion):

intf_oper_state{name="eth1", device="192.0.2.1"} 1
intf_oper_state{name="GigabitEthernet0/1", device="router01"} 1
intf_oper_state{name="swp1", device="leaf01"} 1
Listing 7.2: The three sources normalized into a single consistent metric model.

Enrichment#

Enrichment adds extra content to the observability data beyond what is observed. These extra dimensions allow more sophisticated data consumption. For example, you may be able to understand that the metrics belong to a device that plays a specific role in the network and act accordingly.

There are two main approaches to enrichment:

  • Extending data: Adding extra metadata or labels to the observed data to complement it. This data can be static, such as org=my-company to mark all your data, or dynamic from the collection context, such as collector_id=1234. It can also derive from the observed data itself: given hostname=rtr-1, create a label location=BCN01 by correlating with the SoT.

    intf_oper_state{
        name="swp1",
        device="leaf01",
        role="leaf",
        location="BCN01"
    } 1
  • Creating new data: Following the Prometheus ecosystem’s “info metrics” pattern, we can generate metrics that carry no measurement at all, only context data about the object. These metrics are useful in later observability pipeline stages to add more dimensions to analysis, as you will discover in the Alerting and Analytics section.

    device_info{
        name="leaf01",
        role="leaf",
        vendor="arista",
        model="7050SX3",
        platform="eos",
        os_version="4.29.2F",
        location="BCN01",
        rack="AB1",
        rack_unit="U32",
        environment="prod"
    } 1

Info metrics are a curious type of data: the relevant information is not in the value (e.g., the 1 in the previous metrics) but in the labels. This lets a TSDB that only stores numbers carry text, such as a model name.

Both approaches add labels and context. That is powerful for alerts and analysis. But there is a cost to think about:

  • Cardinality: Every new label multiplies your time series. Device × interfaces × metrics is already high-cardinality. Add labels carelessly and storage explodes and queries slow down. Be thoughtful.
  • Update frequency: Device racks and management IPs do not change every second. Do not poll enrichment data like you poll volatile metrics. Event-driven updates work better and mean fewer queries to your Source of Truth.
  • Resilience: If your Source of Truth goes offline, enrichment stops. Cache it so you keep operating, even degraded. Your automation relies on this data, so make it rock-solid.

Transformation#

Transformation takes raw metrics and derives new ones from them, often by aggregating many series into one. Example: merge all interface input traffic from leaf and spine switches into a single “fabric bandwidth used” metric for trending. You are combining existing data to answer bigger questions or feed dashboards. For example:

- record: fabric:in_bps
  expr: |
    sum by (fabric) (
      rate(interface_in_octets_total[5m]) * 8
      * on (hostname, name) group_left (fabric)
        sot_interface_info{role=~"leaf|spine"}
    )
Listing 7.3: A Prometheus recording rule that derives fabric bandwidth from per-interface counters.

In the Prometheus ecosystem, this is known as recording rules, but I prefer to call them composed metrics.

Composing metrics this way buys three things. Reusability: the fabric bandwidth metric is defined once, and every alert, dashboard, and report reads the same number, so nobody argues about whose query was right. One definition behind alerts and graphs: an alert that fires on fabric:in_bps and a graph that plots it cannot disagree, which removes the whole class of incidents that start with “the alert says 80% but the dashboard says 60%”. Query performance: the expensive aggregation runs once per evaluation interval instead of once per dashboard refresh, which matters when it spans thousands of interfaces.

The cost is storage and one more thing to maintain. Every composed metric is persisted alongside the raw data it came from, and its definition has to be updated when the underlying labels change. So compose the metrics you query repeatedly, not everything you could.

Aggregation is the other way to reduce volume: drop dimensions you do not need for the question the data has to answer. Summarize interface counters per device, or device counters per site. Rate calculations from counters and histogram bucketing belong here too, and both are useful across a wide range of analyses.

Filtering#

Drop the junk early. Not every log line is worth storing. Not every interface metric matters (maybe you do not care about loopbacks). The earlier you filter, the less you waste on storage and processing. Allowlists (only keep this) are safer than denylists (drop that).

Filtering starts in the subscription, not in the processor. Ask only for the paths you need, then drop whatever still gets through. With gNMIc, both halves are configuration:

subscriptions:
  interface-counters:
    paths:
      - /interfaces/interface/state/counters
    mode: sample
    sample-interval: 30s

processors:
  drop-loopbacks:
    event-drop:
      tags:
        - "^Loopback.*"

outputs:
  prom:
    type: prometheus
    event-processors:
      - drop-loopbacks
Listing 7.4: A gNMI subscription with a filtering processor.

The subscription stops the device sending anything but interface counters. The processor then drops the loopbacks, which no path filter can exclude because a loopback is an interface like any other. The order matters: the narrower the subscription, the less work every stage downstream has to do.

Sampling#

Even after filtering, volume might still be too high. Sampling keeps a representative part of it and throttles the rest. Sample probabilistically (“keep 10% of these flow records”), focus on top-K metrics (“only store the 100 busiest interfaces”), or rate-limit per source (“max 1,000 metrics per device”). As data ages in your database, roll it up (5-second granularity becomes 5-minute averages) to save space.

A concrete shape for a 2,000-interface fabric: keep 100 ms counters on the 40 uplinks that carry inter-rack traffic, 10-second counters on every access port, and nothing at all on administratively down ports. Then roll the 100 ms series up to 10-second averages after 24 hours, and to 5-minute averages after 30 days. The uplinks keep the resolution that catches microbursts, and the storage bill reflects the 40 interfaces that needed it, out of 2,000.

The same logic applies later in the pipeline, when you decide what to persist and what to drop.

Effective observability pipelines distribute processing across layers, depending on tooling, scale, and operational constraints.

Distribution#

Simple linear pipelines (collector → processor → database) do not scale well. If the database gets slow, the collector backs up. If you need to upgrade the processor, you stop collection. Everything is tightly coupled and fragile.

This is where message brokers come in. Figure 7.7 shows the shape.

A message broker decoupling producers from consumers

Figure 7.7: A message broker between producers and consumers.

Message brokers like Apache Kafka or NATS sit in the middle. Producers (collectors) publish to topics, and consumers (databases, alerting) pull at their own pace. A processor is both: it consumes a raw topic and publishes the normalized result to another, so each stage of the pipeline can change without touching the others. Neither side knows about the other, which brings three benefits:

  • Scaling: Each component scales independently.
  • Resilience: If a consumer is slow, data queues up instead of being dropped.
  • Flexibility: Same data feeds multiple backends without duplication at the source. Upgrade or restart one component without affecting others.

The broker acts as a buffer that absorbs spikes. See Chapter 12 for more on scaling and reliability patterns.

The broker as an observation window

A message broker is not only a transport. It can also hold the full stream for a short while: long enough to analyze it, without paying to persist it. Figure 7.8 shows the shape: the full firehose lands in the broker, and only two things move on to persistence.

The broker holds the full stream for a short window; stream analysis persists only events and coarse averages

Figure 7.8: The broker as an observation window.

This is an observation window: a short retention, minutes or hours, holding the full firehose as it arrived. Nothing in it is persisted in the sense the next section means, so volume costs you a retention setting rather than a storage bill. Persistence is the opposite trade. It keeps far less data for far longer, and every series you add there you pay for until its retention expires.

This is why stream analysis is worth doing. Interface counters at 100 ms across a 2,000-port fabric are too expensive to persist but perfectly affordable to pass through a broker. So run microburst detection against the stream and persist only what it finds: one event per burst instead of 20,000 samples a second. The data that produced the event is obsolete within the hour, and that is fine, because the event outlives it.

Persist a coarse sample alongside the event and you keep the trend without keeping the firehose. Ten-second or one-minute averages of the same counters cost a fraction of the raw series, and the two answer different questions. The event says a burst happened at 02:41:13 on this port; the coarse series says whether bursts are becoming more frequent on that fabric. Neither is a substitute for the other, and together they are still far cheaper than persisting everything.

This is why Alerting and Analytics reads from both sides. Against persistence it answers questions about trends and history. Against the stream it answers the questions that would be unaffordable to store, which is where the volume lives.

The broker buys you a window. Anything that has to outlive it goes to the block that comes next.

Persistence#

Once data is processed, it needs to live somewhere. The database layer stores all your observability data. It needs to handle huge volumes, support fast queries, and keep costs reasonable.

Metrics, logs, flows, and traces are the obvious contents, but two more kinds of data belong here, and both are easy to forget until an incident needs them:

  • Observed state: the structured record of what the network actually is: which interfaces are configured, which neighbors each device sees, which routes are installed, and which VLANs are present on which trunk. This is the counterpart of the Intent from Chapter 4: it is not what the network should be, but what it actually is. Making it queryable is what lets you answer complex and useful questions: “which devices lost an OSPF neighbor between 02:00 and 02:10” without logging into anything, and it is what drift detection compares against intent. The tool traditionally associated with this role is the Configuration Management Database (CMDB): it records what is in the network, while the SoT declares what should be.

  • Configuration backups: the running configuration of every device, captured on a schedule and on every change. In a post-incident investigation it is the only record of what the device was actually told to do.

A configuration backup store is a credential store whether you planned it or not. Device configurations carry hashed local passwords, SNMP communities, RADIUS and TACACS+ shared secrets, BGP MD5 keys, and tunnel pre-shared keys. Chapter 4 insists the SoT holds references rather than secrets, and the backup repository is where that discipline is most often lost. Give it the access controls, encryption, and audit trail you give the secrets manager, scrub what you can on ingest, and never let it become the convenient read-only copy everybody has access to.

Good databases for observability share common traits:

  • Time-aware: Data is inherently timestamped. Databases optimize for range queries and time-windowed calculations.
  • High write throughput: Constant metric ingest. Databases handle it without slowing down.
  • Multi-dimensional: Metrics carry labels (device, interface, location). Query and aggregate them efficiently.
  • Flexible queries: Need expressive languages (e.g., Prometheus Query Language (PromQL), Log Query Language (LogQL)) to explore data without predefined schemas.
  • Lifecycle management: Storage grows fast. Support retention, downsampling, deletion to control costs.
  • Schema flexibility: New metrics appear constantly. Databases handle evolution without costly migrations.

What database types work?

No single database handles all observability workloads perfectly, and anyone telling you otherwise is selling something. Here is what actually works:

  1. Time-series databases: This is where you start. Prometheus won the metrics war. Its data model (metrics with labels) became the de facto standard, and PromQL is the query language everyone knows.

  2. Columnar databases: ClickHouse is the king here. It is absurdly fast for log aggregation and flow analysis. If you need to query billions of rows for reporting or historical analysis, this is your tool. Parquet files work for analytics workloads where you do not need real-time writes (as SuzieQ does).

  3. Text-search databases: For unstructured log search, Elasticsearch is the established option, and Loki takes a lighter approach by indexing labels rather than full text, which costs less to run at the price of slower arbitrary searches. Commercial platforms such as Splunk bring mature analytics. One point matters more than the product choice: most teams over-invest in log search and under-invest in structured logging, and structured events reduce how much free-text searching you need in the first place.

My recommendation: Start with Prometheus (or similar) for metrics, Loki (or similar) for logs. Add ClickHouse (or similar) when you need serious historical analysis. That stack will get you to massive scale before you need something fancier.

This classification is not absolute; most tools have a primary classification but then implement some characteristics of others (especially time-series).

Two important concepts when designing storage: cardinality (how many unique values a label can take) and dimensionality (how many labels one metric has). Take one metric, interface input bytes, with two labels: device (800 values) and interface (48 values). That is 38,400 time series. Add a third label, vlan, with 100 values, and the same metric becomes up to 3.8 million series. Each label multiplies the total by its own cardinality, so a single careless label can grow storage a hundredfold and slow every query. This is one of the biggest challenges in observability, and the filtering, aggregation, and sampling in the Processor section are the main defenses. When one node is no longer enough, Chapter 12 covers federating the Observability layer.

Map each database to the questions it has to answer. SuzieQ stores its data as columnar Apache Parquet files because its questions are relational, not time-series. A typical one: “Which routes exist on spines but not on all leaves?” Answering that means filtering on many attributes, joining tables (interfaces, neighbors, routes), and comparing rows across devices at one point in time. A columnar store is built for that. A TSDB can count routes, but finding the missing ones would take more labels than it handles well.

Keeping data for longer. Retention is where storage costs grow, and there are two ways to keep history without paying full price for it. Downsampling keeps less detail. Cold storage keeps the detail but moves it somewhere cheaper.

Downsampling is what makes long retention affordable. A counter sampled every 10 seconds produces 8,640 points per day per series; averaged to 5 minutes it produces 288. Keep both and you have answered two different questions: the raw data serves the incident you are debugging this week, and the rolled-up data serves the capacity plan you write next quarter. Table 7.3 lists typical stages.

StageResolutionTypical retentionWhat it answers
Raw10s or finer24 hours to 7 daysWhat happened during this incident
First rollup1 to 5 minutes30 to 90 daysLast month’s trend, post-incident review
Second rollup1 hour1 to 3 yearsCapacity planning, year-on-year growth
Table 7.3: Downsampling stages, and the question each one is kept to answer.

Two rules apply. Decide what each stage is for before you set its retention, because “keep everything for a year” is a budget decision disguised as a technical one. And choose the aggregation per metric: averaging a utilization gauge is reasonable, but averaging a peak is how you lose the microburst you spent the collection budget catching. Keep max alongside mean wherever the spike is the signal.

Cold storage is the second lever. Data older than the database’s own retention moves to cheaper media, usually object storage, where queries are slower but each gigabyte costs a fraction of the price. Many time-series and log stores tier this way natively. A data lake takes the idea further. Raw and processed observability data lands in object storage in an open columnar format, such as Parquet, next to data from other domains, and any analytics engine can query it later. It suits questions nobody has asked yet, such as a capacity model or training data for the anomaly detection later in this chapter. The price is slow queries and a schema you manage yourself.

Stored data is only worth its cost if something acts on it. The next functionality turns it into events, for other automation to consume or for humans to act on.

Alerting and Analytics#

Alerts turn data into action. Your goal: feed them to automation. Notify humans when automation cannot fix it.

Alerts flow through four stages, shown in Figure 7.9:

Alert Stages

Figure 7.9: The stages an alert flows through: detection, processing, routing, and escalation.
  • Detection: Find something that is not behaving as it should.
  • Processing: Enrich with context. Is it critical? Minor? False alarm? Correlate related alerts to reduce noise.
  • Routing: Send to orchestration (run workflows), teams (Slack), or incident management (PagerDuty).
  • Escalation: If automation fails, humans take over.

Setting up alerts is easy. Preventing alert fatigue is the hard part. I have seen NOCs with 10,000 active alerts where nobody looks at any of them anymore. At that point, you do not have monitoring; you have expensive noise.

Here is how you fix it:

  1. Route most alerts to automation (humans second). If a human sees an alert, it should be because automation tried and failed. Interface flapping? Automation checks if it is maintenance, bounces the port, opens a ticket with the vendor. A human only gets paged if automation cannot resolve it.

    Remediation is automation like any other, and it needs the same protections. It needs a dry run before the first real action and a blast-radius limit, so one rule cannot touch the whole fleet. It also needs an approval gate for anything outside an agreed safe set, and a rollback path. Chapter 6 covers those controls and Chapter 8 covers who sequences them. An alert that triggers an unguarded change is worse than an alert nobody reads.

  2. Replace most static thresholds. “CPU > 80%” is often useless: 80% might be normal for that device. Keep static thresholds for hard limits, such as optic power or a full disk. Use dynamic baselines: alert when something deviates from its historical pattern and not from some arbitrary number.

  3. Group related alerts. When a core switch dies, you will get 500 alerts from downstream devices. Show one: “Core switch down, 500 devices affected.” Not 500 individual alerts.

  4. Require a runbook for every alert. If you cannot write down what someone should do when they get the alert, delete the alert. Seriously. If the action is “investigate”, that is not an action; that is a waste of time.

  5. Measure alert quality. Track false positive rates. Any alert with >10% false positives gets fixed or deleted. Track time-to-acknowledge. If alerts sit unacknowledged for hours, they are not important enough to exist.

The goal is not “comprehensive monitoring”. The goal is “only page humans for things humans need to fix”.

The Role of AI and AIOps in Observability#

AI is going to revolutionize automation, but today, most “AI-powered observability” is just anomaly detection with a marketing budget. That said, there is real value here if you deploy it correctly. This section covers what AI adds to observing the network. Letting AI agents decide and act on what they observe is a different step, and Chapter 18 covers it.

What actually works:

  • Anomaly detection: Machine Learning (ML) is better than static thresholds at learning “normal” for each device. CPU at 85% might be fine for device A, disaster for device B. ML figures this out automatically. This is table stakes now, not magic.

  • Alert correlation: When 50 things break simultaneously, ML can group them and suggest “the core switch is probably the root cause.” Saves hours of troubleshooting. But you still need humans to verify, because it gets the root cause wrong often enough that acting on it unchecked will eventually take down something that was healthy.

  • Capacity forecasting: ML is decent at “based on trends, this link will saturate in 6 weeks.” Better than humans eyeballing graphs. Still needs human judgment on whether to care.

What is oversold:

  • Automatic root cause analysis: Every vendor promises this. None deliver reliably. You will get suggestions, sometimes good ones, but “AI diagnosed and fixed the problem” is a demo claim, and the demos are chosen carefully.

  • Self-healing networks: Automation can fix known problems with known solutions. That is not AI; that is good engineering. True “self-healing” for novel problems does not exist yet. When vendors demo it, ask them to show you the failure cases. Where that line actually sits, and how much you can build on the known-problem side of it, is the subject of Chapter 17.

  • “AIOps replaces your NOC”: No. Artificial Intelligence for IT Operations (AIOps) helps your NOC be more effective. The human judgment, business context, and ability to handle edge cases? That is still humans.

Bottom line: Use ML for anomaly detection and alert ranking. Be skeptical of everything else until you have tested it on your actual network. Vendor demos usually work well, but they do not represent your actual reality.

Testing it is concrete work. Take 90 days of your own history, replay it through the tool, and answer three questions. Did it flag the incidents you actually had, and how much earlier than your existing thresholds? How often did it flag something that turned out to be nothing, counted per week per engineer, because that is the number that decides whether anyone keeps reading its output? And when it grouped alerts, was the cause it named the thing you fixed? A tool that beats your current thresholds on the first question and survives the second is worth turning on. One that cannot be measured against your own history is a demo, whatever the label on it says.

The Alert-to-Action Interface#

An alert that a human reads is a notification. An alert that automation consumes is a contract. These two consumers have different requirements, and conflating them is one of the most common reasons alerting pipelines fail at the Orchestrator boundary.

Figure 7.10 shows one detection rule feeding both, through a payload template per consumer.

One detection rule, two payload templates: sentences for people, routed to chat and the pager, and structured fields for the Orchestrator’s webhook

Figure 7.10: One alert, two contracts.

When an alert is destined for automation, its payload must be machine-consumable without parsing. That means structured data, not a human-readable subject line. At minimum, an automation-destined alert payload should include:

  • Device identity: a canonical identifier that matches the SoT record exactly (not a hostname that may differ between DNS and the CMDB).
  • Alert class: a stable, enumerated type the Orchestrator can route on (not a free-text description that changes when someone edits the alert rule).
  • Severity: a defined enumeration instead of a numeric threshold value.
  • Timestamp: the event time in UTC ISO 8601 rather than the notification delivery time.
  • Relevant context: the specific metric or state that triggered the alert, in a field the Orchestrator can read directly (e.g., "interface": "Ethernet0/1" and not embedded in the message string).
  • Source trace: a link or reference back to the raw event in the Observability system, so the Orchestrator can re-query for additional context.

A payload that meets this contract allows the Orchestrator to route the alert to the correct workflow, pass the device identity to the SoT lookup, and invoke the Executor with structured parameters, without any string parsing. A payload that does not meet this contract forces the Orchestrator to parse human-readable text, which breaks every time the alert description changes.

Define this contract before you build the alerting rules. Alert rule authors who write for human readability produce messages that are hard to automate. Those who write for both audiences produce messages that serve neither well. The cleanest solution is two parallel routing paths: one alert format for humans (Slack, PagerDuty), one for automation (message queue, webhook endpoint). Both triggered by the same detection rule: different payload templates for different consumers.

Alerts are what the system says when something needs doing. The last functionality covers what it shows when somebody wants to look.

Visualization#

All the observed data should provide value to the decision-makers, so user-oriented visualization has to answer their actual needs. This is the purpose of this block: the dashboard and report layer.

Let me be blunt: most dashboards are terrible. They are either vanity metrics that make executives feel good (“99.99% uptime!”) or they are data vomit (50 graphs per screen, nobody knows what any of them mean).

The principle that matters most is hierarchy, and Figure 7.11 shows the drill-down path it describes (from bigger scope and less detail, to more focus and deep-dive information). Here is how to build dashboards that help:

Hierarchical dashboard

Figure 7.11: Hierarchical dashboard drill-down, from a global overview down to interface detail.
  • Relevance. Build for decisions instead of decoration. Every widget should answer a specific question or trigger a specific action. If someone looks at a graph and does not know what to do with it, delete the graph or redesign it.

  • Clarity. Show problems, not raw data. Green, yellow, and red signals beat numbers, and every element on the screen should have a purpose. “Interface utilization: 45%” is useless. “Interface utilization: normal”, or “WARNING, trending toward saturation”, is actionable.

  • Hierarchy. Drill-down beats one big dashboard. Start with a global health summary (“3 sites have issues”). Click a site to see device health. Click a device to see interfaces. Five focused dashboards beat one cluttered disaster.

  • Audience. Match the view to the reader. NOC staff need real-time operational status and drill-down. Managers need trend summaries and business impact. Engineers need raw data access and query interfaces. One dashboard trying to serve everyone serves no one.

  • Interactivity. Make it interactive or do not bother. Static dashboards age badly. Let people filter, zoom, and adjust time ranges, so the dashboard supports investigation instead of just showing pictures.

And here is the controversial take: most teams have too many dashboards. I have seen organizations with 200+ dashboards where each person looks at 2 of them. Delete the dashboards nobody uses. If no one looks at it for 3 months, it does not matter.

The Visualization/Presentation boundary

Dashboards built on observability data for operational decisions (what is happening right now, is this service healthy) belong to Observability, because their design is driven by the data: which metrics exist, how alerting is structured, which drill-down paths persistence supports. How those dashboards reach non-technical users, sit inside a self-service portal, or join change management workflows belongs to Presentation (Chapter 9). Most visualization tools, Grafana being the most common, do both, but the two concerns stay different even when one tool serves them.

Visualization lives or dies by how its users perceive it, so interview them and involve them in the design.

That completes the seven functionalities. One more system needs watching before any of it can be trusted: the automation itself.

Observability of the Automation System#

Most teams build observability for the network. Few people build observability for the automation system itself, and this blind spot limits the growth of trust in the automation, because when the system breaks, the failure is often silent. No alert fires, because the system responsible for generating alerts may be the one that just stopped working.

A playbook that exits with status 0 after deploying to zero devices generates no error. A Telegraf instance that silently stops polling a vendor-specific protocol produces no missing-data alert unless you specifically instrument for it. A SoT sync job that fails at 02:00 and leaves the inventory 12 hours stale will cause every subsequent execution to run against outdated device lists, and nothing will signal that this happened.

What to monitor in the NAP

  • Orchestration:

    • Job success rate over time: a slowly rising failure rate is an early warning that something is degrading
    • Execution duration: a job that normally takes 4 minutes taking 40 minutes signals a problem with the NAP, the network, or both
    • Jobs stuck in pending or running states beyond their expected window
    • Rollback frequency: a rising rollback rate usually means intent data or templates have a defect
    • Devices reached per job versus expected: a deployment that touches 10 devices instead of 800 may have silently failed its inventory sync with no error
  • Source of Truth:

    • API response time and error rate: a slow SoT API will stall every execution job that queries it
    • Sync job health per source: last successful sync time, consecutive failure count
    • Data completeness: how many device records are missing mandatory fields that execution depends on
  • Observability:

    • Last successful collection timestamp per device: a device not polled in three consecutive intervals is effectively a monitoring blind spot
    • Collection lag across the fleet: if average data age is growing, the collector is falling behind
    • Missed polling cycles per protocol: SNMP failures and gNMI subscription drops should be counted and alerted on separately

With the expansion of agentic operations, the only way to account for what the agents are doing is to observe them from a neutral vantage point. You cannot trust what they report about themselves. Validate their real behavior.

The hardest automation failures to detect are jobs that complete successfully but change nothing. This is the silent-failure problem. A playbook that deploys to zero devices because of a broken inventory filter will exit with status 0. The only way to catch this class of failure is to instrument at the outcome level: “did the expected number of devices change state?” rather than “did the job process exit cleanly?”

This means adding outcome metrics to execution jobs: a counter for devices successfully configured, a gauge for devices that required rollback, and a check that the job touched at least N devices before marking it successful.

Architectural recommendation: Monitor the NAP in a separate, minimal observability stack that does not depend on the primary observability system it supports. If the main instance goes down, the alerting for the NAP should not go down with it. A lightweight secondary stack (or a SaaS alerting service) covering just the health of the core automation components (AWX, Telegraf, SoT API, sync jobs) provides a safety net that the primary observability system cannot provide for itself.

This connects directly to Chapter 8 (Orchestration): a healthy Orchestrator should report its own operational state as a first-class concern. If the Orchestrator cannot be observed, neither can the automation it coordinates.

Part 3 builds on this list. Chapter 11 runs the separate stack on the Internal Developer Platform (IDP), and Chapter 12 defines the NAP’s health metrics and turns them into service levels.

That covers the seven functionalities, and the system that watches itself. Before seeing them work together on one real network, here are the tools that fill each one.

Solutions Landscape#

Observability has no single tool market. It has one per functionality, and the boundaries between them are where integration work lives. A team that picks a stack by starting with the dashboard, which is the part people see, usually discovers the hard constraints two layers down, in what the collector can speak and what the store can hold.

  • Inventory turns the Source of Truth into a live target list the collectors read. Options: SoT-driven service discovery, service registries (Consul, etcd), or the collector’s own file or DNS discovery. What separates them: whether a device enrolled today is polled today without a human editing a list.
  • Collector speaks the device protocols and gets data off the network. Options: multi-protocol agents (Telegraf, OpenTelemetry Collector), gNMI-specific ones (gNMIc), state-oriented ones (SuzieQ). What separates them: protocol coverage. A collector that cannot speak SNMP strands your older platforms, whatever else it does well.
  • Processor normalizes, enriches, filters, and derives before anything is stored. Options: in-collector processor pipelines, stream processors, the OpenTelemetry Collector’s processor chain. What separates them: whether transformation is configuration or code, and whether you can test it before it runs in the path.
  • Distribution moves data from collectors to stores, and fans it out to more than one consumer. Options: pull-based scraping, message brokers (Kafka, NATS), OTLP pipelines. What separates them: pull is simpler to operate; a broker buys replay and independent consumers, and costs you a system to run.
  • Persistence stores each data type in something shaped for it. Options: metrics stores (Prometheus, VictoriaMetrics, Mimir, InfluxDB), log stores (Loki, Elasticsearch), relational or graph stores for state. What separates them: the query language, the retention and downsampling model, and the point where a single node stops being enough.
  • Alerting and Analytics evaluates conditions and decides where each result goes. Options: store-native rule engines with a router (Alertmanager), dedicated incident platforms, anomaly-detection add-ons. What separates them: whether a rule can compare against intent, and whether routing can tell an alert for a human from one for the Orchestrator.
  • Visualization presents the data to each audience. Options: general-purpose dashboards (Grafana), vendor NMS consoles, purpose-built network views. What separates them: multi-datasource support, because a dashboard that cannot join metrics with inventory metadata shows numbers without context.

Two questions cut across the whole list. The first is how many of these boxes one product should fill. A single vendor platform covering collection through visualization is less integration work and harder to replace piece by piece; assembling seven components gives you substitutability and hands you the integration. Neither is wrong, and the deciding factor is usually how much of the protocol spectrum your fleet needs. The second is OpenTelemetry, a specification and not a product, which therefore sits across several functionalities at once. Adopting it is a bet that a common wire format and a common semantic convention will outlast any component you plug into it. For a greenfield pipeline that bet is increasingly reasonable. For a working SNMP estate it is a migration, and the Fundamentals section covers how to sequence one.

What remains is to see them working together on one real network.

Implementation Example#

We continue with the campus network from Chapter 6, where the Execution block expanded the new VLAN service from Building B to every building. Now Observability takes over: first to validate that the deployment actually succeeded from a network state perspective, then to monitor the service health on an ongoing basis across the full campus.

Scenario: A new VLAN service segment is deployed across ~800 campus switches from three vendors. The operations team needs to confirm it is active and consistent on every intended device, detect drift if a switch loses the VLAN, and monitor traffic health over time, without manual per-device checks.

Requirements:

  • Validate VLAN membership is active and consistent across all target switches after deployment
  • Alert on configuration drift: VLAN missing from a switch, unexpected trunk membership changes
  • Monitor service traffic health: utilization levels and error rates per access port
  • Detect sudden traffic spikes (>50% change) that may indicate misrouted flows
  • Keep 30 days at 30-second resolution for troubleshooting, and 5-minute rollups for a year for capacity planning
  • Integrate with the Source of Truth for device inventory and VLAN intent data
  • Trigger orchestration workflows for automated remediation when drift is detected

Blocks involved:

  1. Source of Truth: holds the device inventory, the monitoring profile per device, and the VLAN service definition the deployment was built from
  2. Execution: deployed the service, and is the block that remediation calls back into
  3. Orchestration: receives the alerts that carry an automation label, and runs the remediation workflow
  4. Observability:
    • Inventory: syncs targets from the SoT, so a switch enrolled today is polled today
    • Collector: polls SNMP on the older platforms and subscribes to gNMI on the newer ones
    • Processor: normalizes both into one metric model, enriched with site, role, and service from the SoT
    • Distribution: collectors expose metrics for scraping, so the pipeline stays pull-based at this scale
    • Persistence: ~307K series at 30-second resolution, retained for 30 days
    • Alerting and Analytics: drift and saturation rules, routed either to automation or to people
    • Visualization: one dashboard family per audience, drilling from campus down to interface

The flow below is described by function. Unlike most Part 2 chapters, this one names the products at the end, because the companion book builds this same stack hands-on. Every one of them is open source, so you can go and build this yourself. None of it is a recommendation. The device platforms stay generic, as they do across Part 2: what matters is that there are three of them and that they do not all speak the same protocol.

Solution Architecture#

Start by estimating the scale: ~800 campus switches × 48 ports × 8 metrics gives about 307K active time series. That is well within what a single time-series database node handles comfortably, around 1M series, but the collector layer needs more than one instance to distribute the polling load across 800 devices at 30-second intervals.

Three of the seven functions drive the product choice, because their requirements are the hard ones to meet. The other four follow from them: Inventory is a small sync service, the Processor runs inside the Collector, Distribution is plain scraping at this scale, and Alerting rides on the Persistence query language. The three need the following:

  • The Collector needs multi-protocol support, because this fleet speaks SNMP on the older platforms and gNMI on the newer ones, plus processors that can normalize both into one model before anything downstream sees them. At 800 devices on a 30-second interval, one instance is stretched, so the function is deployed as two or three instances with a service registry coordinating which targets each one owns. Do not size that tier from a formula; watch what it actually consumes: CPU, memory, and whether each collection cycle finishes inside its interval. Scale out when cycle time starts approaching the interval, and let that be automatic where the runtime supports autoscaling. Collector capacity is cheap to add and hard to predict, so measuring beats estimating.
  • Persistence needs a query language expressive enough to carry the alert conditions, because the alerting rules in this design are queries rather than thresholds on a single series. At ~307K series the volume is unremarkable for any time-series database; the query language is the differentiator.
  • Visualization needs more than one data source, because a useful dashboard joins metrics with the inventory metadata that gives them context: which site, which role, which service. A dashboard layer that can only read the metrics store produces numbers without context.

Architecture

Figure 7.12 shows the main components and their roles:

Solution Architecture

Figure 7.12: The example observability architecture.

This architecture is covered extensively in the Modern Network Observability book. If you want a hands-on approach with a lab scenario to test, give it a try.

Implementation Flow#

The seven functionalities show up in order, each one handing off to the next:

  1. Know the targets. The Source of Truth defines which devices to monitor, with a monitoring profile and a credential reference per device. A lightweight sync service, a script driven by webhooks, keeps a service registry current, so the Inventory functionality hands collectors a live target list instead of one somebody maintains by hand.

  2. Collect. The Collector uses that registry for service discovery and starts polling a device as soon as it appears: SNMP on the older platforms, gNMI on the newer ones.

  3. Normalize and enrich. The Processor, running inside the Collector, converts status codes to labels, renames fields into the common model, and attaches the site, role, and service context from the SoT, then exposes the result on an HTTP endpoint for scraping.

  4. Store. Persistence scrapes those endpoints, through the same service registry, and keeps the series for 30 days at 30-second resolution. Recording rules precompute interface utilization and bandwidth rates, which is the composed-metrics pattern from the Processor section, and a downsampled copy at 5-minute resolution keeps a year of history for capacity planning.

  5. Detect. Alert rules express the conditions: a VLAN missing where the SoT says it belongs, utilization above 80% for five minutes, a traffic change beyond 50%. An alert router decides where each one goes, and this is where the alert-to-action contract pays off. Alerts labeled automation: enabled reach the Orchestrator’s webhook as structured payloads; everything else goes to a chat channel or a paging service by severity.

  6. Show. Visualization serves one dashboard family per audience: campus-wide bandwidth trends, top saturated interfaces, and per-device drill-down with interface heatmaps. Template variables filter by site, role, or device, and the dashboards read the metrics store for the numbers and the SoT for the metadata that gives them context.

  7. Act. A drift alert, VLAN 412 missing from a switch where the SoT says it belongs, reaches the Orchestrator as a structured payload. The Orchestrator runs the remediation workflow, under a standing change for this class of drift (Chapter 16): it has the Executor redeploy the VLAN to that one switch, then asks Observability to confirm the fix. That closes the loop, and Chapter 8 covers the coordination side of it.

Concretely, this example fills those functions with Nautobot as the Source of Truth, Consul as the service registry, Telegraf as the Collector and Processor, Prometheus for Persistence, Alertmanager as the alert router, and Grafana for Visualization. All of it is open source and all of it is substitutable: swap the time-series database and steps 4 through 6 change their query syntax, not their shape. Figure 7.12 above shows the same pipeline with these components in place.

Solution Summary#

Operational benefits:

  • Reduced manual monitoring effort through SoT integration
  • Proactive issue detection with sub-minute latency
  • Closed-loop remediation reducing Mean Time to Recovery (MTTR) from hours to minutes
  • Rich context combining metrics with inventory data

Scalability considerations:

  • Current architecture handles ~800 campus switches with two or three distributed collector instances behind a service registry; adding more buildings or devices means adding more collector instances instead of rearchitecting
  • Persistence is sufficient at ~307K series with room to grow; a single node handles up to ~1M series before requiring federation or a distributed backend

That exercise closes the chapter: seven functionalities, one campus network, and a stack you could stand up this week.

Summary#

Monitoring (or Observability) has been around forever, but not everyone associates it with network automation. Observability is a fundamental block in the network automation architecture because it provides an actual understanding of how the network is behaving. Not what you want it to be, but what it actually is.

In this chapter, I also included the Collector block because I see them closely integrated. Both together provide a complete stack to offer visibility of the network state, starting with a discovery of the network from the Intent via dynamic inventory, collecting the data, processing it, and distributing it. Finally, after the data is persisted, alerting, analytics, and visualization act upon the data to hand an event to the Orchestrator or a proper visualization to the Presentation layer.

It is also important to include the NAP’s own observability, but decoupled from the network’s. Watch the watcher, so no blind spots exist.

The natural next block after Observability is Orchestration, in Chapter 8, which can take its output and decide what to do about it.

References#

  • Modern Network Observability, David Flores, Christian Adell, and Josh VanDeraa (Packt, 2024). A hands-on approach to network observability using open-source tools such as Telegraf, Prometheus, and Grafana.
  • Observability Engineering, Charity Majors, Liz Fong-Jones, and George Miranda (O’Reilly, 2022). The distinction between monitoring and observability and the case for high-cardinality, event-based telemetry that underpins this chapter’s data model.
  • Site Reliability Engineering, Betsy Beyer, Chris Jones, Jennifer Petoff, and Niall Richard Murphy (O’Reilly, 2016). Monitoring, the four golden signals, and SLI/SLO design. (Full text free online.)
  • Network Programmability and Automation, 2nd Edition, Matt Oswalt, Christian Adell, Scott S. Lowe, and Jason Edelman (O’Reilly, 2023). Streaming telemetry, gNMI, and model-driven data collection that feed the Collector and Observability blocks.

💬 Found something to improve? Send feedback for this chapter

📖 Enjoying the book? It is also available on Kindle and in paperback. Get it on Amazon →