Is there an option to find sum of uniques tags in a series and group them by time? E.g. I’m storing the Node information as a tag and I want to find out how many unique nodes are available during any instance of time
@sbains Tags are stored as
strings and you cannot apply functions to them. If you have a query like so:
SELECT mean(value) FROM cpu WHERE time > now() - 1h GROUP BY node, time(1m)
The number of nodes would be very easy to determine from the number of buckets returned by the
GROUP BY. Does that help?
The strings can very well be counted :p. I think using your approach it is good for one time check but in longer run it isn’t. E.g. I want to see the count of nodes for last 24 hours referenced by time window(5m). Running the suggested query will be very expensive.
I rather see this as an Enhancement request.
A simple solution is to extend “show tag values” functionality to be queried using where time clause, it is currently not available. This way I can see unique nodes and easily perform a count on it.