LXC memory % in Grafana

svenvg93

Active Member
Sep 15, 2017
10
0
41
31
I'm currently creating Grafana dashboards for my systems. I have one for the CPU usage in %. But i can't seem to find one for memory usage. Only memfree, memused etc.

Is this option available?
 
no this field does not exist, but you can use the memused and memfree to achieve the same thing, no?
 
I could use it. But it give me a lot of data, see screenshot. Can I calculate a percentage with this data in grafana?
 

Attachments

  • 4A74478C-2194-43E7-AF12-C6BBA0E38942.png
    4A74478C-2194-43E7-AF12-C6BBA0E38942.png
    206.6 KB · Views: 39
i use a query like this:
Code:
SELECT mean("mem")/mean("maxmem") AS used FROM "system" WHERE "object" = 'qemu' OR "object" = 'lxc' AND $timeFilter GROUP BY time($__interval), "host" fill(null)
and alias by : $tag_host

afaics, you cannot do this with the graphical editor in grafana, but you can still enter the query manually
 
  • Like
Reactions: svenvg93
i use a query like this:
Code:
SELECT mean("mem")/mean("maxmem") AS used FROM "system" WHERE "object" = 'qemu' OR "object" = 'lxc' AND $timeFilter GROUP BY time($__interval), "host" fill(null)
and alias by : $tag_host

afaics, you cannot do this with the graphical editor in grafana, but you can still enter the query manually

Thanks you are a life safer!