2015-10-22 16:17:57 +00:00
|
|
|
# Prometheus Client Service Output Plugin
|
|
|
|
|
2017-09-19 18:27:11 +00:00
|
|
|
This plugin starts a [Prometheus](https://prometheus.io/) Client, it exposes all metrics on `/metrics` (default) to be polled by a Prometheus server.
|
2015-10-22 16:17:57 +00:00
|
|
|
|
2017-06-19 18:04:08 +00:00
|
|
|
## Configuration
|
|
|
|
|
2018-08-24 23:37:11 +00:00
|
|
|
```toml
|
2017-06-19 18:04:08 +00:00
|
|
|
# Publish all metrics to /metrics for Prometheus to scrape
|
|
|
|
[[outputs.prometheus_client]]
|
2018-08-24 23:37:11 +00:00
|
|
|
## Address to listen on.
|
2017-06-29 21:03:42 +00:00
|
|
|
listen = ":9273"
|
2017-06-19 18:04:08 +00:00
|
|
|
|
2018-08-24 23:37:11 +00:00
|
|
|
## Use HTTP Basic Authentication.
|
|
|
|
# basic_username = "Foo"
|
|
|
|
# basic_password = "Bar"
|
|
|
|
|
|
|
|
## If set, the IP Ranges which are allowed to access metrics.
|
|
|
|
## ex: ip_range = ["192.168.0.0/24", "192.168.1.0/30"]
|
|
|
|
# ip_range = []
|
2018-02-01 19:12:16 +00:00
|
|
|
|
2018-08-24 23:37:11 +00:00
|
|
|
## Path to publish the metrics on.
|
|
|
|
# path = "/metrics"
|
2018-02-01 19:12:16 +00:00
|
|
|
|
2018-08-24 23:37:11 +00:00
|
|
|
## Expiration interval for each metric. 0 == no expiration
|
|
|
|
# expiration_interval = "60s"
|
2018-08-01 22:43:34 +00:00
|
|
|
|
2018-08-24 23:37:11 +00:00
|
|
|
## Collectors to enable, valid entries are "gocollector" and "process".
|
|
|
|
## If unset, both are enabled.
|
|
|
|
# collectors_exclude = ["gocollector", "process"]
|
2017-09-19 18:27:11 +00:00
|
|
|
|
2018-08-24 23:37:11 +00:00
|
|
|
## Send string metrics as Prometheus labels.
|
|
|
|
## Unless set to false all string metrics will be sent as labels.
|
|
|
|
# string_as_label = true
|
2018-02-16 22:07:26 +00:00
|
|
|
|
2018-08-24 23:37:11 +00:00
|
|
|
## If set, enable TLS with the given certificate.
|
|
|
|
# tls_cert = "/etc/ssl/telegraf.crt"
|
|
|
|
# tls_key = "/etc/ssl/telegraf.key"
|
2017-06-19 18:04:08 +00:00
|
|
|
```
|