Monitoring Proxmox VE

Good afternoon,

I’ve just install checkmk and have configured it to monitor some servers in my lab. The basic server monitoring is working well.

I’ve followed the blog post on configuring it to monitor Proxmox VE servers but can’t get checkmk to discover anything about the PVE server. All I get is:

Version: 2.0.0p12, OS: linux, [special_proxmox_ve] Version: unknown, OS: unknown, execution time 3.6 sec | execution_time=3.560 user_time=0.110 system_time=0.020 children_user_time=0.400 children_system_time=0.050 cmk_time_agent=2.980 cmk_time_ds=0.010

When running from the command prompt, I can manually run the Proxmox VE agent and it returns what seems like valid information:

MD[Gareth]:~$ share/check_mk/agents/special/agent_proxmox_ve  '-u' 'checkmk@pve' -'p' '<pve password>' '<pve fqdn>'

WARNING 2021-10-27 12:46:57 cmk.special_agents.utils.misc: Cache: could not find file - start a new one
<<<proxmox_ve_node_info:sep(0)>>>
{"lxc": ["107"], "proxmox_ve_version": {"release": "7.0", "repoid": "7aa7e488", "version": "7.0-13"}, "qemu": ["100", "101", "102", "103", "104", "105", "106"], "status": "online", "subscription": {"status": "NotFound"}}
<<<proxmox_ve_mem_usage:sep(0)>>>
{"max_mem": 12370526208, "mem": 10416164864}
<<<uptime>>>
22559
<<<<ns1>>>>
<<<proxmox_ve_vm_info:sep(0)>>>
{"name": "ns1", "node": "pve0", "status": "running", "type": "qemu", "vmid": "100"}
<<<proxmox_ve_mem_usage:sep(0)>>>
...

I can therefore assume that the configuration of Proxmox and my username/password in checkmk is good. However, that information does not appear in checkmk.

OMD[Gareth]:~$ cmk -D pve0 | head -n 20

pve0                                                                           
Addresses:              172.27.1.20
Tags:                   [address_family:ip-v4-only], [agent:all-agents], [criticality:critical], [ip-v4:ip-v4], [networking:lan], [piggyback:auto-piggyback], [site:Gareth], [snmp_ds:no-snmp], [tcp:tcp]
Labels:                 [cmk/os_family:linux]
Parents:                rt1
Host groups:            check_mk
Contact groups:         check-mk-notify, all
Agent mode:             Normal Checkmk agent, all configured special agents
Type of agent:          
  TCP: 172.27.1.20:6556
  Program: /omd/sites/Gareth/share/check_mk/agents/special/agent_proxmox_ve --pwstore=4@0@pve_gareth '-u' 'checkmk@pve' '-p' '********' 'pve0'
  Process piggyback data from /omd/sites/Gareth/tmp/check_mk/piggyback/pve0
Services:
  checktype                      item                      params   
...

The only difference between the cmk version and my manual attempts at running the agent is that cmk is using the internal password vault. I’ve double checked that though.

I can see the request hitting Proxmox VE as it shows up in the logs every few seconds:

Oct 27 12:54:01 pve0 systemd[1]: pvesr.service: Consumed 1.140s CPU time.
Oct 27 12:54:34 pve0 systemd[1]: Started Checkmk agent (172.27.10.60:34590).
Oct 27 12:54:37 pve0 systemd[1]: check_mk@501-172.27.1.20:6556-172.27.10.60:34590.service: Succeeded.
Oct 27 12:54:37 pve0 systemd[1]: check_mk@501-172.27.1.20:6556-172.27.10.60:34590.service: Consumed 1.797s CPU time.

Can someone guide me on how to further investigate this issue please?

Thanks in advance,

Gareth

It turns out that this issue is due to the fact that I added hosts by hostname only (as opposed to FQDN). Therefore certificate validation failed when the agent attempted to contact the Proxmox VE server which has a certificate who’s SAN contains the FQDN only.

The hostname can be edited from the Properties page of the host. From the Host menu, select Rename and enter the FQDN of the host, exactly as specified in the Subject Alternate Name (SAN) extension of the Proxmox VE server’s TLS certificate.

In addition, if the Proxmox server is using a certificate issued by an internal CA, the root CA certificate will need to be added to the check_mk server’s trust-anchor store.

I too have this problem, but the hostname matches the FQDN of Proxmox, I also tried turning off the validation of the cert.

Check_MK shows

[agent] Version: 2.0.0p20, OS: linux, [special_proxmox_ve] Version: unknown, OS: unknown, execution time 3.0 sec

These 2 PVE services are showing nicely though.

Proxmox VE Memory Usage -- Usage: 95.78% - 59.9 GiB of 62.6 GiB	171 m    46.8 s   95.78%
Proxmox VE Node Info -- Status: online, Subscription: notfound, Version: 7.1-6, Hosted VMs: 0x LXC, 19x Qemu

I’ve also noticed I can get it to tell me the backup status? or does that only work when using piggyback?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.