Skip to content

Commit

Permalink
Update metrics config documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
mozzieongit committed Feb 11, 2025
1 parent def0b73 commit fb2e7c4
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
24 changes: 24 additions & 0 deletions nsd.conf.5.in
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,30 @@ The port number for proxy protocol service. If the statement is given multiple
times, additional port numbers can be used for proxy protocol service. The
interface definitions that use this port number expect PROXYv2 proxy protocol
traffic, for UDP, TCP and for TLS service.
.TP
.B metrics\-enable:\fR <yes or no>
Enable the prometheus metrics HTTP endpoint. It exposes the same statistics as
the \fInsd\-control\fR(8) stats_noreset command, but with metric names
following the prometheus specification.

Beware, that when using \fInsd\-control\fR(8) stats (instead of stats_noreset),
the statistics will be reset for the HTTP metrics endpoint as well.
.TP
.B metrics\-interface:\fR <ip4 or ip6 | interface name>
NSD will bind to the listed addresses or interfaces to serve the prometheus
metrics. Can be given multiple times to bind multiple ip\-addresses. Use
0.0.0.0 and ::0 to bind to the wildcard interface.

If an interface name is used instead of ip4 or ip6, the list of IP addresses
associated with that interface is picked up and used at server start.

Default is 127.0.0.1 and ::1.
.TP
.B metrics\-port:\fR <number>
The port number for the HTTP service. Default is 9100.
.TP
.B metrics\-path:\fR <string>
The HTTP path to expose the metrics at. Default is /metrics.
.SS "Remote Control"
The
.B remote\-control:
Expand Down
17 changes: 17 additions & 0 deletions nsd.conf.sample.in
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,23 @@ server:
# expect PROXYv2. For UDP and TCP/TLS interfaces.
# proxy-protocol-port: portno for each of the port numbers.

# Enable the prometheus metrics HTTP endpoint. Default is no.
# metrics-enable: no

# Interfaces to expose the HTTP endpoint on, default is on localhost.
# Interfaces can be specified by IP address or interface name.
# With an interface name, all IP addresses associated with that
# interface are used. Default is 127.0.0.1 and ::1.
# metrics-interface: 127.0.0.1
# metrics-interface: ::1
# metrics-interface: lo

# Port number for the HTTP metrics endpoint. Default is 9100.
# metrics-port: 9100

# HTTP path for the metrics endpoint. Default is /metrics.
# metrics-path: "/metrics"

verify:
# Enable zone verification. Default is no.
# enable: no
Expand Down

0 comments on commit fb2e7c4

Please sign in to comment.