Hello!
I’ve got a few counters for different iptables rules (collected with collectd).
Using Grafana, I can plot rates (bytes/s) for these byte counters like that:
SELECT non_negative_derivative(sum("value"), 1s)
FROM "iptables_value" WHERE
"type" = 'ipt_bytes' AND
"type_instance" = "$host" AND
"instance" = 'filter-INPUT' AND
$timeFilter
GROUP BY time($interval) fill(null)
$host here is Grafana’s templating parameter. It can be one/many/all hosts, but
that’s irrelevant, host selection works.
Above query indeed returns bytes/s — as long as Grafana’s time $interval is ≤
10s. (I’m measuring at 10s intervals in collectd).
I’m using sum() because the user can choose not only one, but many hosts in one
query (Grafana will automagically change the WHERE part of the query to contain
appropriate ORs).
As long as $interval ≤ 10s, buckets contain only *one* value from any given
host. E.g. with 20s buckets, there are *two* values of each host in the bucket,
and, in the result, reported rate is 2× higher that it really was.
Now, on the plots that plot only *one* host’s data, I do use mean() instead of
sum(), and that works. But I also need “total” plots…
The query should be:
SELECT non_negative_derivative(sum(series_mean("value")))
… but that’s really not possible…
What to do? I cannot define a Continuous Query for every possible combination
(subset) of hosts that the user can use. That would be 2^n CQs for n hosts… =)
--
Remember to include the InfluxDB version number with all issue reports
---
You received this message because you are subscribed to the Google Groups
"InfluxDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit
https://groups.google.com/d/msgid/influxdb/c38c9d59-7b31-4bc1-a718-9389574ae7a8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.