Prometheus Metrics in NSD 4.12.0

Prometheus Metrics in NSD 4.12.0
Photo by Mitchel Boot / Unsplash

By Jannik Peters

We finally implemented a Prometheus metrics endpoint, providing the statistics you know from nsd-control stats/stats_noreset in Prometheus format via HTTP.

To enable the Prometheus metrics endpoint, specify the option enable-metrics: yes in the config's server section.

You can then point your Prometheus exporter at http://localhost:9100/metrics by default. Use metrics-interface to change the listening address/interface, metrics-port for the listening port, and metrics-path for the HTTP path.

The provided metrics are annotated with help and type information.

Beware when using both nsd-control stats and the Prometheus metrics, as nsd-control stats will reset the stats for both.