diff --git a/plugins/outputs/prometheus_client/README.md b/plugins/outputs/prometheus_client/README.md index 7d4fe09b1..9beaa062d 100644 --- a/plugins/outputs/prometheus_client/README.md +++ b/plugins/outputs/prometheus_client/README.md @@ -3,10 +3,9 @@ This plugin starts a [Prometheus](https://prometheus.io/) Client, it exposes all metrics on `/metrics` (default) to be polled by a Prometheus server. -## Configuration +### Configuration ```toml -# Publish all metrics to /metrics for Prometheus to scrape [[outputs.prometheus_client]] ## Address to listen on. listen = ":9273" @@ -52,3 +51,9 @@ all metrics on `/metrics` (default) to be polled by a Prometheus server. ## Export metric collection time. # export_timestamp = false ``` + +### Metrics + +Prometheus metrics are produced in the same manner as the [prometheus serializer][]. + +[prometheus serializer]: /plugins/serializers/prometheus/README.md#Metrics diff --git a/plugins/serializers/prometheus/README.md b/plugins/serializers/prometheus/README.md index 9a0cdfea2..19c869ffb 100644 --- a/plugins/serializers/prometheus/README.md +++ b/plugins/serializers/prometheus/README.md @@ -10,7 +10,7 @@ somewhat, but not fully, mitigated by using outputs that support writing in "batch format". When using histogram and summary types, it is recommended to use only the `prometheus_client` output. -## Configuration +### Configuration ```toml [[outputs.file]] @@ -35,6 +35,19 @@ use only the `prometheus_client` output. data_format = "prometheus" ``` +### Metrics + +A Prometheus metric is created for each integer, float, boolean or unsigned +field. Boolean values are converted to *1.0* for true and *0.0* for false. + +The Prometheus metric names are produced by joining the measurement name with +the field key. In the special case where the measurement name is `prometheus` +it is not included in the final metric name. + +Prometheus labels are produced for each tag. + +**Note:** String fields are ignored and do not produce Prometheus metrics. + ### Example **Example Input**