From b2423c56a59409d1be4fec49fd147160c4db9eb2 Mon Sep 17 00:00:00 2001 From: Simon Westphahl Date: Fri, 15 Jun 2018 11:10:55 +0200 Subject: [PATCH] Update readme regarding metric type matching Co-authored-by: Simon Westphahl Signed-off-by: Simon Westphahl --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 245c29b..9eb1610 100644 --- a/README.md +++ b/README.md @@ -251,6 +251,21 @@ mappings: You can drop any metric using the normal match syntax. The default action is "map" which does the normal metrics mapping. +StatsD allows emitting of different metric types under the same metric name, +but the Prometheus client library can't merge those. For this use-case the +mapping definition allows you to specify which metric type to match: + +``` +mappings: +- match: test.foo.* + name: "test_foo" + match_metric_type: counter + labels: + provider: "$1" +``` + +Possible values for `match_metric_type` are `gauge`, `counter` and `timer`. + ## Using Docker You can deploy this exporter using the [prom/statsd-exporter](https://registry.hub.docker.com/u/prom/statsd-exporter/) Docker image.