[SOLVED] Proxmox influxdb KSM shares metric

membranex

Member
Nov 6, 2018
20
3
8
41
Hi,

I hooked proxmox to Influx/Grafana via External Metric Server. Data is awesome, just one hiccup - I can't find the number for "KSM sharing" stat from node summary. Could someone point me to proper metric in influx?

Thanks in advance!
 
So, instead of looking for this data I just added an input into telegraf that reads the data from /sys/ file:
INI:
[[inputs.file]]
  files = ["/sys/kernel/mm/ksm/pages_sharing"]
  file_tag = "ksm_pages"
  data_format = "value"

And used this in a query in Grafana:
SQL:
SELECT last("value") * 4096 FROM "file" WHERE ("host" =~ /^$server$/ AND "ksm_pages" = 'pages_sharing') AND $timeFilter GROUP BY time($__interval) fill(null)

And voile! Now I can see all the KSM goodness and squash even more VMs on my hardware ;)
 
  • Like
Reactions: bleakczar