I’m using graphite to collect data, and I’d like to retrieve the total count of certain events over a period of time. Say, number of logins per week.
However, I just need the total number, and don’t need to see how it evolves over time.
When I use something like from=-1w&target=summarize(stats.events.login.success,"1w")&format=json then I still get two datapoints, and not one.
Is there a way to get a single datapoint from the summarize function? or use a different function to return a single datapoint value?
The problem here is that summarize doesn’t align to the from field by default.
If you do
you should get just one datapoint. What it’s doing right now is aligning your buckets to dates that don’t fit within the week range starting from your from parameter, so you end up with 2 buckets. From the graphite docs on summarize: