Reputation: 2000
We've got a system which writes some count metrics using a Counter from io.dropwizard.metrics java lib. The system is deployed once a day and our count metrics look in such way:
What I need is to summarize all that daily counts to a month value. Afterwards I'll show it as a single stat. How can I do that?
Here is the query for the graph:
sumSeries(mysys.{prod,production}.{server1,server2,server3}.important.metric.count))
Upvotes: 0
Views: 253
Reputation: 794
This will give you what you want for last 30 days - summarize(nonNegativeDerivative(mysys.{prod,production}.{server1,server2,server3}.important.metric.count)), "30d", "sum", false)
Or use consolidateBy(integral(sumSeries(nonNegativeDerivative(mysys.{prod,production}.{server1,server2,server3}.important.metric.count))), 'max')
and set "Override relative time" in Grafana (it's on "Time range" tab in Graph's settings) for 30 days
Upvotes: 0