[SOLVED] LXC Uptime Grafana Query

jamest65

Member
Apr 29, 2021
40
5
13
59
Hi All,

I have my Proxmox 2nd node all running great and efficiently. I installed Grafana and the latest version of Influxdb inside a container and works like a champ.

I have running lxc containers info missing and wondered if anyone has any idea what the correct measurement under system to use for showing LXC containers running on the node

I am getting network info from LXC inside the graph with I/O etc. is uptime the correct parameter to use? I have checked my DB and I am getting all info into the DB.

Code:
SELECT last(uptime) AS "uptime" FROM "system" WHERE ("object" = 'lxc') AND ("nodename" =~ /^$node$/) AND time > (now() - 10m) AND uptime > 0 GROUP BY "host" limit 1

thanks for any assistance.
 
if anyone can point me to where I can see a list of the metrics for objects and queries that would be appreciated. I have 99% working just cant get LXC containers to list in my dashboard for uptime?
 
Im using this query:
Code:
SELECT mean("uptime") AS used FROM "system" WHERE ("object" = 'lxc' AND "nodename" = 'nodename') AND $timeFilter GROUP BY time($__interval), "host" fill(null)
 
Im using this query:
Code:
SELECT mean("uptime") AS used FROM "system" WHERE ("object" = 'lxc' AND "nodename" = 'nodename') AND $timeFilter GROUP BY time($__interval), "host" fill(null)
thanks that got me fixed. is there any documentation on the objects and queries?