Skip to content
This repository was archived by the owner on Aug 23, 2023. It is now read-only.

Commit ca45c6b

Browse files
authored
Merge pull request #1369 from grafana/active-metrics
add entry about active metrics
2 parents b9bbfac + dd0395e commit ca45c6b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

docs/faq.md

+15
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,18 @@ Metrictank will automatically combine the data together like so:
2424
Metrics can have tags and metrictank supports queries via the [graphite tag query api](https://graphite.readthedocs.io/en/latest/tags.html)
2525
In the future, metrictank aims to provide a proper implementation of [metrics 2.0](http://metrics20.org/)
2626
(it helps that both projects share the same main author)
27+
28+
## What are different ways to reason about "active metrics"?
29+
30+
* `tank.metrics_active`: number of series known to the tank (i.o.w. for which we have in-memory buffers).
31+
each metricdefinition corresponds to one series, so this excludes rollups.
32+
series get cleared every gc-interval (1h by default) by comparing metric-max-stale (3h by default) against the lastWrite property,
33+
which is wallclock time of when last point was successfully added
34+
* `index.metrics_active`: the number of metricdefinitions held within the in-memory index (i.o.w. that are available for querying)
35+
subject to pruning via the [index rules config file](https://github.com/grafana/metrictank/blob/master/docs/config.md#index-rulesconf)
36+
(these rules are applied during index loading at startup time and at runtime during Prune(), see prune-interval setting for your index plugin. 3h by default)
37+
(compared against lastUpdate property, which is set to timestamp of most recent data)
38+
* output of `mt-index-cat`:
39+
queries the persistent index using a single "default" index rule based on the maxStale flag (exclude entries with lastUpdate too old)
40+
and cuts off on the fly based on minStale (which excludes entries that have a lastUpdate "too recent". disabled by default)
41+
So this is equivalent to the index, assuming the index prune-interval is sufficiently low and assuming you don't filter via minStale (which the index doesn't do)

0 commit comments

Comments
 (0)