Skip to content

Commit

Permalink
Merge pull request #164 from flant/remove_stale_metrics
Browse files Browse the repository at this point in the history
Remove stale metrics
  • Loading branch information
Matthias Rampke authored Dec 20, 2018
2 parents ef5d2c8 + 699c11c commit 7364c6f
Show file tree
Hide file tree
Showing 7 changed files with 506 additions and 119 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ defaults:
buckets: [.005, .01, .025, .05, .1, .25, .5, 1, 2.5 ]
match_type: glob
glob_disable_ordering: false
ttl: 0 # metrics do not expire
mappings:
# This will be a histogram using the buckets set in `defaults`.
- match: test.timing.*.*.*
Expand Down Expand Up @@ -350,6 +351,18 @@ mappings:

Possible values for `match_metric_type` are `gauge`, `counter` and `timer`.

### Time series expiration

The `ttl` parameter can be used to define the expiration time for stale metrics.
The value is a time duration with valid time units: "ns", "us" (or "µs"),
"ms", "s", "m", "h". For example, `ttl: 1m20s`. `0` value is used to indicate
metrics that do not expire.

TTLs are applied to each mapped metric name/labels combination whenever
new samples are received. This means that you cannot immediately expire a
metric only by changing the mapping configuration. At least one sample must
be received for updated mappings to take effect.

## Using Docker

You can deploy this exporter using the [prom/statsd-exporter](https://registry.hub.docker.com/u/prom/statsd-exporter/) Docker image.
Expand Down
Loading

0 comments on commit 7364c6f

Please sign in to comment.