A system I’m working on uses JSON logs and then CloudWatch log filters to pull interesting information from the logs and turn them into metrics so I can graph them to see what’s going on.
It looks a bit like this:
I can see that the metrics are coming out OK, because the values are visible in the AWS console.
However, when I added the metric as a SUM to Grafana, I saw something unexpected:
That’s not right, I’ve asked for a sum of an integer and got a decimal point value…
Fortunately, the great team here at Infinity Works had seen this one before and pointed me at the Options tab has a setting for the
Stat value, which has a default of
Average. Change that to
Total and normality is restored. Phew.