[SOLVED] Proxmox influxdb KSM shares metric

membranex

Member
Nov 6, 2018
20
3
8
40
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

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!