mirror of
https://github.com/prometheus/statsd_exporter.git
synced 2024-11-26 09:11:01 +00:00
Break the quantile documentation into a summary-specific paragraph
to untangle the summary and histogram configuration, give an explicit example of a summary match. Signed-off-by: Matthias Rampke <mr@soundcloud.com>
This commit is contained in:
parent
a144b1f9f7
commit
8d1a9e0330
1 changed files with 27 additions and 10 deletions
37
README.md
37
README.md
|
@ -162,6 +162,32 @@ mappings:
|
||||||
code: "$1"
|
code: "$1"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
By default, statsd timers are represented as a Prometheus summary with
|
||||||
|
quantiles. You may optionally configure the [quantiles and acceptable
|
||||||
|
error](https://prometheus.io/docs/practices/histograms/#quantiles):
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
mappings:
|
||||||
|
- match: test.timing.*.*.*
|
||||||
|
timer_type: summary
|
||||||
|
name: "my_timer"
|
||||||
|
labels:
|
||||||
|
provider: "$2"
|
||||||
|
outcome: "$3"
|
||||||
|
job: "${1}_server"
|
||||||
|
quantiles:
|
||||||
|
- quantile: 0.99
|
||||||
|
error: 0.001
|
||||||
|
- quantile: 0.95
|
||||||
|
error: 0.01
|
||||||
|
- quantile: 0.9
|
||||||
|
error: 0.05
|
||||||
|
- quantile: 0.5
|
||||||
|
error: 0.005
|
||||||
|
```
|
||||||
|
|
||||||
|
The default quantiles are 0.99, 0.9, and 0.5.
|
||||||
|
|
||||||
In the configuration, one may also set the timer type to "histogram". The
|
In the configuration, one may also set the timer type to "histogram". The
|
||||||
default is "summary" as in the plain text configuration format. For example,
|
default is "summary" as in the plain text configuration format. For example,
|
||||||
to set the timer type for a single metric:
|
to set the timer type for a single metric:
|
||||||
|
@ -176,15 +202,6 @@ mappings:
|
||||||
provider: "$2"
|
provider: "$2"
|
||||||
outcome: "$3"
|
outcome: "$3"
|
||||||
job: "${1}_server"
|
job: "${1}_server"
|
||||||
quantiles: # Optionally configure quantiles for your summaries
|
|
||||||
- quantile: 0.99 # https://prometheus.io/docs/practices/histograms/#quantiles
|
|
||||||
error: 0.001
|
|
||||||
- quantile: 0.95
|
|
||||||
error: 0.01
|
|
||||||
- quantile: 0.9
|
|
||||||
error: 0.05
|
|
||||||
- quantile: 0.5
|
|
||||||
error: 0.005
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Another capability when using YAML configuration is the ability to define matches
|
Another capability when using YAML configuration is the ability to define matches
|
||||||
|
@ -213,7 +230,7 @@ automatically.
|
||||||
only used when the statsd metric type is a timerand the `timer_type` is set to
|
only used when the statsd metric type is a timerand the `timer_type` is set to
|
||||||
"histogram."
|
"histogram."
|
||||||
|
|
||||||
One may also set defaults for the timer type, buckets and match_type. These will be used
|
One may also set defaults for the timer type, buckets or quantiles, and match_type. These will be used
|
||||||
by all mappings that do not define these.
|
by all mappings that do not define these.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
|
Loading…
Reference in a new issue