I’ve about 250 hosts reporting into a measurement called xtables every minute. Those are raw counters.
I’m converting these raw counters to 5 minute averages into another metric with a continuous query to avoid recalculating every time I select the same data.
So I have this CQ:
CREATE CONTINUOUS QUERY cq_rate_recalc ON my_stats BEGIN SELECT (8 * non_negative_derivative(mean("inet"), 1s)) AS internet, (8 * non_negative_derivative(mean("http"), 1s)) AS http, (8 * non_negative_derivative(mean("https"), 1s)) AS https, (8 * non_negative_derivative(mean("http_alt"), 1s)) AS http_alt INTO my_stats.autogen.recalculated FROM my_stats.autogen.iptables GROUP BY time(5m), host fill(0) END
And it works for 197 hosts. Meanwhile, all configured hosts are still submitting their data to the iptables measurement and if I run the query by hand I get proper data. However, running a query in a cronjob seems very counter productive, especially since CQs exist to do this particular thing.
Does anyone know why is this happening?
Any tips are greatly appreciatted!