Repository navigation
telemetry
Pre-Alpha. This page describes behavior that may change.
Ze can expose internal metrics in Prometheus format over HTTP. The telemetry { prometheus { } } block configures the listener, the HTTP path, and whether the endpoint is active. When enabled, any Prometheus-compatible scraper can collect counters and gauges from Ze without extra exporters. The same listener also serves OS metrics from /proc and /sys, named after Netdata's exporter, and a /health endpoint.
telemetry {
prometheus {
enabled true;
server default {
ip 0.0.0.0;
port 9273;
}
}
}
With this configuration, Ze serves metrics at http://0.0.0.0:9273/metrics on every interface. Without an explicit ip, the listener binds 127.0.0.1 only.
| Path | Type | Default | Description |
|---|---|---|---|
telemetry/prometheus/enabled |
boolean | false |
Enable the Prometheus metrics endpoint. |
telemetry/prometheus/server <name> |
list | -- | Named listen endpoint, keyed by instance name. |
telemetry/prometheus/server/ip |
ip-address | 127.0.0.1 |
Listen IP address (IPv4 or IPv6). |
telemetry/prometheus/server/port |
uint16 | 9273 |
Listen TCP port. |
telemetry/prometheus/path |
string | /metrics |
HTTP path where metrics are served. /health is served beside it. |
telemetry/prometheus/netdata |
container | -- | Netdata-compatible OS collectors; see below. |
Multiple server entries are supported. Each creates a separate HTTP listener, useful when you need metrics on both a management VRF address and a loopback.
telemetry/prometheus/basic-auth guards every handler on the Prometheus service, /metrics and /health both.
| Path | Type | Default | Description |
|---|---|---|---|
basic-auth/enabled |
boolean | false |
Require HTTP Basic Authentication. |
basic-auth/realm |
string | ze prometheus |
The realm sent in the challenge. |
basic-auth/username |
string | -- | The username. |
basic-auth/password |
string | -- | The bcrypt hash. Set this directly when automation already holds a hash from ze passwd. |
basic-auth/plaintext-password |
string | -- | Write-only input. Ze hashes it into password and removes this leaf. |
The plaintext leaf is hashed at two moments, not one. The config editor hashes it at commit and writes only the hash. A config file loaded at daemon start or at SIGHUP gets the same transform in memory, and Ze then warns that the plaintext is still on disk. Your file is not rewritten.
Before that second path existed, a file carrying plaintext-password loaded with an empty password, every authentication attempt for that user failed, and ze config validate called the file valid. The same transform applies to every ze:bcrypt leaf in the schema, not only this one.
The YANG module ze-telemetry-conf defines the schema (abridged):
container telemetry {
container prometheus {
leaf enabled { type boolean; default false; }
list server {
key "name";
leaf name { type string; }
leaf ip { type ip-address; default "127.0.0.1"; }
leaf port { type uint16; default 9273; }
}
leaf path { type string; default "/metrics"; }
container basic-auth { ... }
container netdata {
leaf enabled { type boolean; default true; }
leaf prefix { type string; default "netdata"; }
leaf interval { type uint16 { range "1..60"; } default 1; }
list collector {
key "name";
leaf enabled { type boolean; default true; }
leaf interval { type uint16 { range "1..60"; } }
}
}
}
}prefix, interval, and collector directly under prometheus are deprecated aliases. Ze reads one only when the matching netdata leaf is absent and logs the path it read; a netdata collector list replaces the old one whole.
Ze samples /proc and /sys and exports the result with Netdata's metric names and labels, in the form {prefix}_{context}_{units}_average{chart="...",dimension="...",family="..."}, so dashboards written against Netdata's Prometheus exporter can read them. No test compares the names, values, or count against a running Netdata, so treat it as name-compatible rather than a drop-in replacement.
Coverage includes CPU, cpufreq, cpuidle, memory, load, processes, softirqs, pressure (PSI), per-interface and aggregate network, IPv4 and IPv6 protocol counters, sockets, conntrack, softnet, disk I/O and space, mdstat, ZFS, btrfs, vmstat, SCTP, IPVS, wireless, uptime, entropy, and file descriptors. A collector whose source is absent (no ZFS, no wireless NIC) is skipped.
The netdata block only governs these OS metrics: it never renames Ze-native ze_* metrics.
telemetry {
prometheus {
enabled true;
netdata {
interval 1;
collector diskspace { enabled false; }
collector snmp6 { interval 10; }
}
}
}
The names collector accepts are cpu, memory, loadavg, netdev, diskstats, stat, snmp, snmp6, conntrack, vmstat, sockstat, sockstat6, softnet, softirqs, pressure, entropy, filenr, uptime, and diskspace. netdata { enabled false; } exports the Ze-native metrics alone.
The --pprof flag starts a Go pprof HTTP server on a given address, but it is separate from the Prometheus endpoint. pprof exposes Go runtime profiling data (goroutines, heap, CPU profiles) and is meant for debugging, not operational monitoring.
ze --pprof 127.0.0.1:6060The pprof address must be 127.0.0.1, ::1, or localhost with a port; any other address, an empty host included, is refused at startup. It does not serve Prometheus metrics. For Prometheus metrics, use the telemetry { prometheus { } } configuration block.
The Prometheus endpoint exports counters and gauges from these sources:
- Engine metrics. BGP sessions, prefix counts, message rates, RPKI validation states, forwarding pool utilisation, per-peer overflow depth, system resource usage. These ship with the core binary.
-
Plugin-owned metrics. Each Go plugin can register its own counters and gauges through a
ConfigureMetricscallback. The plugin keeps ownership of the metric objects and updates them directly. Many plugins ship their own metric sets this way (for examplebgp-rib,bgp-watchdog,bgp-rpki,fib-kernel,sysrib,as112, andcos), all exposed on the same endpoint, so a single scrape gets everything. -
Host inventory.
ze_host_*gauges for memory, CPUs, uptime, ECC, NIC speed and carrier, block device size, and thermal sensors; see Host inventory. -
Without BGP. A config with
telemetryand nobgpblock (an OSPF-only router, for example) gets its metrics registry installed before the engine and the plugins start, so a plugin's startup counters land in the same registry the exporter serves.
The exporter is compiled in by default and can be left out with the ze_telemetry build tag; such a build rejects the telemetry {} block as unknown, but still records every ze_* metric internally.
Metric names follow the ze_{scope}_{subject}_{detail} convention. Counters usually end in _total, though not every one does (the ze_cos_dynamic_* counters), and the two ze_host_ecc_*_total gauges mirror kernel counters. The plugin authoring side is documented under Go plugins: Prometheus metrics. The full catalogue of exposed metrics is in operation/monitoring.md.
A quick test:
curl -s http://127.0.0.1:9273/metrics | head -20Override the defaults when the standard /metrics path or port 9273 conflicts with other services on the host:
telemetry {
prometheus {
enabled true;
path "/ze/metrics";
server mgmt {
ip 10.255.0.1;
port 9274;
}
}
}
- Overview for the surrounding config model.
- Monitoring for the full list of exposed metrics.
- System for listener configuration patterns.
Unreviewed draft. This wiki was authored in bulk and has not been reviewed. File corrections on the issue tracker.
- Install
- Docker
- netlab
- Appliance
- Quick Start
- Use Ze with an AI agent
- ExaBGP Migration
- CLI Tour
- Web UI Tour
- Overview
- YANG Model
- Editor Workflow
- Archive and Rollback
- Backup and Restore
- System
- Interfaces
- VRRP
- BFD
- FIB
- OSPF
- IS-IS
- MPLS / LDP / RSVP-TE
- RSVP-TE
- SRv6
- Static Routes
- Policy Routing
- Firewall
- Traffic Control
- Class of Service
- L2TP/PPP
- PPPoE
- VPP Data Plane
- RPKI
- IPsec VPN
- Path MTU
- TACACS+ AAA
- RADIUS AAA
- AS112 DNS
- DNS
- Authorization
- Fleet
- BGP
- Starting and Stopping
- Show Commands
- Monitoring
- Telemetry
- Flow Export
- DDoS Mitigation
- Anomaly Detection
- Health Checks
- Audit Trail
- Production Diagnostics
- Logging
- Operational Reports
- Healthcheck
- Self-Update
- Zero-Touch Provisioning
- MRT Analysis
- Upgrade and Restart
- Storage
- Policy
- Core
- Resilience
- Validation
- Link State
- Capabilities
- Address Families
- Protocol
- Subsystems
- Infrastructure
- Route Server at an IXP
- Transit Edge with RPKI
- Public Looking Glass
- ExaBGP Migration Walkthrough
- FlowSpec Injection
- Chaos-Tested Peering
- AS Path Topology