After update to 2.0.0.p30 RAW proxmox special agent did not work anymore

CMK version: 2.0.0.p30
OS version: docker

Error message:
Missing monitoring data for check plugins: proxmox_ve_mem_usage, proxmox_ve_vm_info, proxmox_ve_vm_snapshot_age

Output of “cmk --debug -vvn hostname”: (If it is a problem with checks or plugins)

Calling: /omd/sites/cmk/share/check_mk/agents/special/agent_proxmox_ve '-u' 'XXX@XXX '-p' 'XXXXXX' '--port' 8006 '--no-cert-check' 'pvex-0.domain.de'
Write data to cache file /omd/sites/cmk/tmp/check_mk/data_source_cache/special_proxmox_ve/pvex-0.domain.de
Trying to acquire lock on /omd/sites/cmk/tmp/check_mk/data_source_cache/special_proxmox_ve/pvex-0.domain.de
Got lock on /omd/sites/cmk/tmp/check_mk/data_source_cache/special_proxmox_ve/pvex-0.domain.de
Releasing lock on /omd/sites/cmk/tmp/check_mk/data_source_cache/special_proxmox_ve/pvex-0.domain.de
Released lock on /omd/sites/cmk/tmp/check_mk/data_source_cache/special_proxmox_ve/pvex-0.domain.de

The file /omd/sites/cmk/tmp/check_mk/data_source_cache/special_proxmox_ve/pvex-0.domain.de is empty

1 Like

Here one more test output

OMD[cmk]:~$ /omd/sites/cmk/share/check_mk/agents/special/agent_proxmox_ve '-u' 'xxx@xxx' '-p' 'XXXX' '--port' 8006 '--no-cert-check' 'pvex-0.domain.de'
WARNING 2022-11-10 11:33:30 agent_proxmox_ve: Found error for VM '806': "VM 806 qmp command 'backup' failed - got timeout"
WARNING 2022-11-10 11:33:30 agent_proxmox_ve: Found error for VM '804': 'backup close image failed: command error: stream error received: stream no longer needed'
WARNING 2022-11-10 11:33:30 agent_proxmox_ve: Found error for VM '803': 'backup close image failed: command error: stream error received: stream no longer needed'
WARNING 2022-11-10 11:33:30 agent_proxmox_ve: Found error for VM '890': 'backup close image failed: command error: stream error received: stream no longer needed'
WARNING 2022-11-10 11:33:30 agent_proxmox_ve: Found error for VM '800': "VM 800 qmp command 'query-backup' failed - got timeout"
WARNING 2022-11-10 11:33:30 agent_proxmox_ve: Found error for VM '890': "VM 890 qmp command 'backup' failed - backup register image failed: command error: unable to get shared lock - EACCES: Permission denied"
<<<<pvex-2>>>>
<<<proxmox_ve_node_info:sep(0)>>>
<<<<>>>>
Unhandled exception: KeyError('time')

Hi I am experiencing the same issue.
OS version: debian/ubuntu on bare-metal
But we are using CMK Enterprise-Edition!

<<<<proxmox-1>>>>
<<<proxmox_ve_node_info:sep(0)>>>
<<<<>>>>
Unhandled exception: KeyError('time')

I’m on 2.0.0p31 and getting the same error:

/opt/omd/versions/2.0.0p31.cre/share/check_mk/agents/special/agent_proxmox_ve --verbose --debug -u Check_MK@pve -p 'XXXXXXXX' '--port' 8006 '--no-cert-check' '--timeout' 60 myhostname.net
INFO 2022-12-15 10:48:21 root: running file /omd/sites/it/lib/python3/cmk/special_agents/utils/agent_common.py
INFO 2022-12-15 10:48:21 root: using Python interpreter v3.8.15.final.0 at /omd/sites/it/bin/python3
INFO 2022-12-15 10:48:21 agent_proxmox_ve: Establish connection to Proxmox VE host 'myhostname.net'
INFO 2022-12-15 10:48:21 agent_proxmox_ve: Fetch general cluster and node information..
INFO 2022-12-15 10:48:22 agent_proxmox_ve: Fetch and process backup logs..
WARNING 2022-12-15 10:48:22 cmk.special_agents.utils.misc: Cache: could not find file - start a new one
INFO 2022-12-15 10:48:22 agent_proxmox_ve: all VMs:          ['1000', '101', '101020001', '10102002', '102', '200']
INFO 2022-12-15 10:48:22 agent_proxmox_ve: expected backups: []
INFO 2022-12-15 10:48:22 agent_proxmox_ve: actual backups:   []
INFO 2022-12-15 10:48:22 agent_proxmox_ve: snaptimes:        {'200': {'snaptimes': []}, '101020001': {'snaptimes': []}, '1000': {'snaptimes': []}, '10102002': {'snaptimes': []}, '101': {'snaptimes': []}, '102': {'snaptimes': []}}
INFO 2022-12-15 10:48:22 agent_proxmox_ve: Write agent output..
<<<proxmox_ve_node_info:sep(0)>>>
Traceback (most recent call last):
  File "/opt/omd/versions/2.0.0p31.cre/share/check_mk/agents/special/agent_proxmox_ve", line 10, in <module>
    main()
  File "/omd/sites/it/lib/python3/cmk/special_agents/agent_proxmox_ve.py", line 757, in main
    special_agent_main(parse_arguments, agent_proxmox_ve_main)
  File "/omd/sites/it/lib/python3/cmk/special_agents/utils/agent_common.py", line 159, in special_agent_main
    _special_agent_main_core(parse_arguments, main_fn, sys.argv[1:])
  File "/omd/sites/it/lib/python3/cmk/special_agents/utils/agent_common.py", line 141, in _special_agent_main_core
    main_fn(args)
  File "/omd/sites/it/lib/python3/cmk/special_agents/agent_proxmox_ve.py", line 502, in agent_proxmox_ve_main
    "time_info": node["time"],
KeyError: 'time'

I can confirm the same error in 2.0.0p31 CEE.

Version 2.1.0p18 does not have this issue.

Hi @LaMi,

this bug still exists in 2.0.0p32

1 Like

I believe it has something to do with the remaining time of the subscription. Too bad if you don’t have any…

By just replacing node['time'] with something else in /opt/omd/versions/2.0.0p32.cre/lib/python3/cmk/special_agents/agent_proxmox_ve.py I was able to get both services directly on the host and also all the piggybacked services back.

This could ultimately be fixed by checking if time in node, but somebody with a valid subscription can maybe tell what this variable usually holds.

1 Like

Thanks!
Now it works again without problems.
I’ve changed it to
"time_info": "", # node["time"], instead of only “time_info”: node[“time”],`

How can I do this change in a docker image?
Upgraded to 2.0.0p33 and have the same issue…

Hi, how did you fix it in your docker image?
Can you help?

enter shell inside docker container

docker exec -it checkmk_monitoring_1 /bin/bash

install editor you like

apt install vim
apt install nano

start editor, edit in line 502 (search for time_info):

vi /opt/omd/versions/2.0.0p33.cre/lib/python3/cmk/special_agents/agent_proxmox_ve.py

change line to:

“time_info”: “”, #node[“time”],

Thanks, worked like a charm!

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.