CMK version: 2.1.0p19.cre
OS version: proxmox VE 7.3 / debian buster
Error message: [special_proxmox_ve] Agent exited with code 1: Caught unhandled KeyError(‘timezone’) in /omd/sites/mc/lib/python3/cmk/special_agents/utils/agent_common.py:135(!!)
Output of “cmk --debug -vvn hostname”: [agent] Success, [special_proxmox_ve] Agent exited with code 1: Caught unhandled KeyError(‘timezone’) in /omd/sites/mc/lib/python3/cmk/special_agents/utils/agent_common.py:135(!!), execution time 45.6 sec | execution_time=45.610 user_time=0.220 system_time=0.040 children
_user_time=1.080 children_system_time=0.170 cmk_time_agent=8.760 cmk_time_ds=35.330 (If it is a problem with checks or plugins)
The pescial agent agent_proxmox_ve produces this error as soon as one node of cluster is missing. When all nodes are up and running the plugin works as expected.
The error can be reproduces alling the plugin standalon on cli.
NFO 2023-01-14 15:08:28 root: running file /omd/sites/mc/lib/python3/cmk/special_agents/utils/agent_common.py
INFO 2023-01-14 15:08:28 root: using Python interpreter v3.9.10.final.0 at /omd/sites/mc/bin/python3
INFO 2023-01-14 15:08:28 agent_proxmox_ve: Establish connection to Proxmox VE host '***********'
INFO 2023-01-14 15:08:28 agent_proxmox_ve: Fetch general cluster and node information..
INFO 2023-01-14 15:08:48 agent_proxmox_ve: Fetch and process backup logs..
INFO 2023-01-14 15:08:48 agent_proxmox_ve: BackupTask('vzdump', t='2023.01.14-00:00:02', vms=('210', '1211102'))
... some more ,,BackupTask" lines ...
then the plugin terminates with:
Traceback (most recent call last):
File "/opt/omd/versions/2.1.0p19.cre/share/check_mk/agents/special/./agent_proxmox_ve", line 10, in <module>
main()
File "/omd/sites/mc/lib/python3/cmk/special_agents/agent_proxmox_ve.py", line 883, in main
special_agent_main(parse_arguments, agent_proxmox_ve_main)
File "/omd/sites/mc/lib/python3/cmk/special_agents/utils/agent_common.py", line 161, in special_agent_main
_special_agent_main_core(parse_arguments, main_fn, argv or sys.argv[1:])
File "/omd/sites/mc/lib/python3/cmk/special_agents/utils/agent_common.py", line 135, in _special_agent_main_core
main_fn(args)
File "/omd/sites/mc/lib/python3/cmk/special_agents/agent_proxmox_ve.py", line 533, in agent_proxmox_ve_main
node_timezones[node["node"]] = node["time"]["timezone"]
KeyError: 'timezone'
Since we have a cluster with some ,standby" nodes on proxmox we will ,hopfully" allways have nodes down in the cluster. Unfortunalty the plugin is not usable for this scenario. Is there any option to allow nodes down in clusters?
Regards and thanks for advise
Lukas