I also watched this YouTube video from about the 5 minute mark where he adds a host and gets piggyback data: Monitoring Proxmox with Checkmk
So based on the above, I added a host in my CheckMK as follows:
Clicked “Add Host”
Named the host the same as it is in my Proxmox (“Test-Server-1”)
Set “IP address family” to “No IP” (if I leave it blank as in the YT video I get a DNS error – CheckMK can’t resolve the host name to an IP address – which would be expected)
“Piggyback” is left as the default value of “Use piggyback data from other hosts if present” but I have also tried “Always use and expect piggyback data”, but that results in a warning about missing piggyback data
Set “Checkmk agent / API integrations” to “No API integrations, No Checkmk agent”
When I save and do a Service Discovery, I get “OK - [piggyback]: Success (but no data found for this host)”
What might i be missing to get the piggyback data for my Proxmox guests?
First i would take a look at the folder “~/tmp/check_mk/piggyback” inside your monitoring site.
There you see all the hostnames as your system gets it from the Proxmox server.
What do you see there?
First i would take a look at the folder “~/tmp/check_mk/piggyback” inside your monitoring site.
There you see all the hostnames as your system gets it from the Proxmox server.
What do you see there?
I see all the hostnames of my devices, but they all have ‘-deactivated’ appended to them (e.g., ‘Test-Server-1-deactivated’)
Please have a look inside your system for the rule “Host name translation for piggybacked hosts”. It is possible that there a rule exists that appends “-deactivated” to every name.
Yup, that was it! I don’t recall creating the rule, nor why I would have, but there it was. I have deactivated the rule itself, and I am now seeing piggyback data for the specific host in question.
Some other VMs are now reporting piggyback data, but there are others that are not after creating a couple of piggyback translation rules and renaming some VMs in Proxmox.
For example, in CheckMK, I have a folder where the hosts are all named ‘somehost.domain.tld’ so I created a piggyback hostname translation rule like this:
I then made sure that the name of the VM in Proxmox was renamed to ‘somehost’ (with the same capitalization – I use lower-case).
As mentioned, some other VMs are now picking up (and reporting ) the piggyback data but others are not. I can see the folders in the ‘~/tmp/check_mk/piggyback’ folder of the now lower-case names I updated in Proxmox, but now I can’t determine why some get the piggyback data and others do not.
OK, so I thought I found the “solution” by just having “Convert FQHN” checked, but while it seemed to initially work, I soon started getting warnings about the piggyback data not being updated by the source.
So if all my hostnames in CheckMK are ‘hostname.fqdn’ (where ‘fqdn’ can be multiple different ones) and the VM names in Proxmox are ‘hostname’, what is the regex I would use? I have tried different ones that I came across from Google search but none seemed to work.
I found another post where someone “cheated” by creating a symbolic link in ‘~/tmp/check_mk/piggyback/hostname’ to ‘~/tmp/check_mk/piggyback/hostname.fqdn’, and when I do that, it does work (the CheckMK hosts get their piggyback data), but that is obviously not really a viable solution.