Prometheus - exporting metrics (#21187)
Co-authored-by: ilyam8 <ilya@netdata.cloud>
Kanela committed
Oct 22, 2025 at 19:07 UTC
fc3980911f0414a45b7334c77e0ef18501f634c2
1 file changed
+25
src/exporting/prometheus/README.md
+25
@@ -249,6 +249,31 @@ Server identification:
249
| Behind proxy or NAT | Append `&server=NAME` to URL |
250
| Multiple servers, same IP | Each uses unique `&server=NAME` |
251
252
+### Host Labels
253
+
254
+Netdata supports custom host labels that are exported to Prometheus. Configure labels in `/etc/netdata/netdata.conf`:
255
+
256
+```ini
257
+[host labels]
258
+ environment = production
259
+ region = us-east-1
260
+ datacenter = dc1
261
+```
262
+
263
+After defining them, the labels will appear in the `netdata_info` metric, for example:
264
+
265
+```text
266
+netdata_info{
267
+ instance="some-server",
268
+ application="netdata",
269
+ version="v2.7.2",
270
+ datacenter="dc1",
271
+ region="us-east-1",
272
+ environment="production",
273
+ _is_ephemeral="false"
274
+} 1 1761148307085
275
+```
276
+
277
## Configure Prometheus to Scrape Netdata Metrics
278
279
The following `prometheus.yml` scrapes all Netdata metrics "as collected":