Update README.md

This commit is contained in:
juliusv 2013-07-06 00:32:52 +02:00
parent 42ad6cb8d6
commit fe0359ec09

View file

@ -41,6 +41,21 @@ label value are replaced by the n-th wildcard match in the matching line,
starting at 1. Multiple matching definitions are separated by one or more empty starting at 1. Multiple matching definitions are separated by one or more empty
lines. The first mapping rule that matches a StatsD metric wins. lines. The first mapping rule that matches a StatsD metric wins.
Metrics that don't match any mapping in the configuration file are translated
into Prometheus metrics without any labels and with certain characters escaped
(`_` -> `__`; `-` -> `__`; `.` -> `_`).
In general, the different metric types are translated as follows, with certain
suffixes appended to the Prometheus metric names:
StatsD gauge -> Prometheus gauge (suffix `_gauge`)
StatsD counter -> Prometheus counter (suffix `_counter`)
StatsD timer -> Prometheus summary (suffix `_timer`) <-- indicates timer quantiles
-> Prometheus counter (suffix `_timer_total`) <-- indicates total time spent
-> Prometheus counter (suffix `_timer_count`) <-- indicates total number of timer events
An example mapping configuration: An example mapping configuration:
test.dispatcher.*.*.* test.dispatcher.*.*.*
@ -59,23 +74,11 @@ An example mapping configuration:
This would transform these example StatsD metrics into Prometheus metrics as This would transform these example StatsD metrics into Prometheus metrics as
follows: follows:
test.dispatcher.FooProcessor.send.success test.dispatcher.FooProcessor.send.success (counter)
=> dispatcher_events{processor="FooProcessor", action="send", outcome="success", job="test_dispatcher"} => dispatcher_events_counter{processor="FooProcessor", action="send", outcome="success", job="test_dispatcher"}
foo_product.signup.facebook.failure foo_product.signup.facebook.failure (counter)
=> signup_events{provider="facebook", outcome="failure", job="foo_product_server"} => signup_events_counter{provider="facebook", outcome="failure", job="foo_product_server"}
Metrics that don't match any mapping in the configuration file are translated test.web-server.foo.bar (gauge)
into Prometheus metrics without any labels and with certain characters escaped => test_web__server_foo_bar_gauge{}
(`_` -> `__`; `-` -> `__`; `.` -> `_`).
In general, the different metric types are translated as follows, with certain
suffixes appended to the Prometheus metric names:
StatsD gauge -> Prometheus gauge (suffix `_gauge`)
StatsD counter -> Prometheus counter (suffix `_counter`)
StatsD timer -> Prometheus summary (suffix `_timer`) <-- indicates timer quantiles
-> Prometheus counter (suffix `_timer_total`) <-- indicates total time spent
-> Prometheus counter (suffix `_timer_count`) <-- indicates total number of timer events