Currently I’m trying todo smth that is done in Chronograf “Host List”. So, to have a list of hosts and it’s status even if machine is down and there is no data into some measurements(let say
system) still show the host and maybe set some status. Now, a query like this works ok:
SELECT last("usage_idle") * -1 + 100 as "cpu_usage" FROM "cpu" WHERE ("cpu" = 'cpu-total') AND time > now() - 1m GROUP BY host
But when there will be no data host will not be shown. I guess I need to combine 2 queries, first run smth like this:
SHOW TAG VALUES FROM /win_system|system/ WITH KEY = "host"
and after that combine this with the above query to have what I need, but not sure yet.
Is this possible, can anyone guide me into right direction?
Thx a lot!