JSONDecoderError trying to get proxmox special agent running (agent_proxmox_ve)

I upgraded to 2.0.0p9 and try to get proxmox special agent running.

Inventory check displays no Info from this agent.
When I run i on CLI like

./share/check_mk/agents/special/agent_proxmox_ve ‘-u’ ‘cmk@pve’ ‘-p’ ‘SOmePass’ ‘–port’ 8006 ‘–no-cert-check’ ‘fqdn of host’

I get

Unhandled exception: JSONDecodeError(‘Expecting value: line 1 column 1 (char 0)’)

I see a successful login on the cluster host. The cluster hos has installed (upgraded) the latest agent. But on the cluster host is the mpk qemu installed from monitoring vm installed for Version 1.6.0p25

Any hint how to get the new special agent proxmox_ve running?

Thanks Lukas

Hi @mensinck
did you assigned the proper rights for the user inside proxmox?

Please assign the created user to the Read_Only group.

Here is an official Blogpost from Checkmk on how to properly monitor your proxmox enviroment:

Greetings Norm :grinning:

Hi @Norm,

Thanks for Your reply. I worked through the blog you mentioned. And the user is member of a group which has assigned ,PVE-Auditor" right.

The funny thing is, what I figured out in the meantime:

I do have a second cluster with the same configuration. I can access the api on this cluster using the same parameters as on the first, not working, cluster.

So I think I have to debug the JSON response to see whats wrong on Cluster configuration. But I do not know how to get the response debugged on check_mk site. --debug on cli command will not show me the raw data.

Regards Luaka

What I figured out is:

  1. I can access both cluster I try to monitor using curl and api calls…

  2. Both cluster are sending information for example to api2/json/nodes:

A) Working cluster in cmk

curl --insecure --cookie "$(<cookie)" https://10.1.0.11:8006/api2/json/nodes/

{"data":[{"maxdisk":72917082112,"level":"","uptime":1737838,"ssl_fingerprint":"40:FB:1F:BC:AF:84:AD:17:00:8E:1F:6E:C6:D4:4E:ED:76:EE:53:E4:00:77:46:51:10:CF:1C:FD:BA:B4:CC:56","node":"pve11","maxmem":202792255488,"cpu":0.0392048424043194,"mem":106509987840,"status":"online","id":"node/pve11","maxcpu":24,"type":"node","disk":6425444352},{"id":"node/pve13","status":"online","mem":110634098688,"cpu":0.0325383434460698,"disk":12424396800,"type":"node","maxcpu":24,"level":"","maxdisk":72917082112,"maxmem":202792255488,"ssl_fingerprint":"2B:AA:33:BF:4B:F1:6B:E2:11:38:CF:6F:7C:15:0B:E4:45:80:D6:22:B1:3C:DD:23:11:88:F0:F8:98:DC:C3:3D","node":"pve13","uptime":1742170},{"node":"pve12","ssl_fingerprint":"F8:BD:F6:E5:7B:A2:B1:66:D4:94:79:6D:BB:31:E0:EA:03:0E:A4:1F:28:67:CF:22:5F:19:A0:B9:3A:D5:7D:3D","uptime":1740224,"maxmem":202792366080,"maxdisk":72917082112,"level":"","type":"node","maxcpu":12,"disk":6132224000,"mem":89475149824,"status":"online","id":"node/pve12","cpu":0.081519469246617}]}

B) And also the ,not working" cluster… Unhandled exception: JSONDecodeError(‘Expecting value: line 1 column 1 (char 0)’)

curl --insecure --cookie "$(<cookie)" https://192.168.120.143:8006/api2/json/nodes/

{"data":[{"id":"node/pve145","ssl_fingerprint":"0F:E8:73:9C:42:8C:77:4B:54:48:03:B8:F5:16:0F:A0:52:5B:83:70:AD:BB:E8:2A:E1:59:34:53:EC:91:DD:76","status":"offline","node":"pve145","type":"node"},{"status":"online","cpu":0.0321348301827427,"node":"pve149","ssl_fingerprint":"D7:DA:28:8F:8C:88:28:B6:78:98:20:8F:03:8A:8D:8E:10:2A:75:AF:50:30:4F:D7:08:3F:61:F5:CF:41:FC:DB","uptime":946312,"maxdisk":72917082112,"level":"","maxmem":135146557440,"mem":64010133504,"type":"node","id":"node/pve149","disk":13713842176,"maxcpu":32},{"status":"offline","ssl_fingerprint":"02:BB:D6:A7:D1:C7:22:C8:D2:25:E2:78:5D:B9:4A:AF:D0:FE:57:28:3A:2B:A6:9D:2C:06:DA:39:71:A9:69:24","node":"pve152","type":"node","id":"node/pve152"},{"id":"node/pve147","node":"pve147","type":"node","ssl_fingerprint":"04:5D:D2:CD:F8:5F:06:2A:C0:59:A5:D8:57:88:5C:92:B1:00:49:D2:9B:5A:00:F7:2C:B4:E2:59:83:6E:63:FC","status":"offline"},{"id":"node/pve153","status":"offline","ssl_fingerprint":"03:CE:88:96:06:24:62:DE:A8:B4:F4:36:60:68:01:20:55:67:94:A4:3F:13:03:AC:24:C5:62:DE:3E:B6:D5:B6","node":"pve153","type":"node"},{"ssl_fingerprint":"11:2A:F7:23:E4:21:51:A1:10:05:56:EF:1B:70:82:30:40:8F:49:32:3B:1D:F9:5D:21:C7:09:48:08:CC:81:D4","status":"offline","type":"node","node":"pve151","id":"node/pve151"},{"ssl_fingerprint":"BC:89:C2:31:76:C0:DD:97:A7:58:0C:39:24:5D:BC:62:D0:60:70:7F:8B:45:96:70:AF:FB:61:5C:67:52:47:9B","node":"pve144","maxdisk":17568661504,"uptime":944280,"level":"","maxmem":126724317184,"status":"online","cpu":0.0692345936366371,"disk":7880556544,"id":"node/pve144","maxcpu":16,"mem":69064015872,"type":"node"},{"type":"node","mem":57873694720,"maxcpu":32,"disk":5036539904,"id":"node/pve143","status":"online","cpu":0.0502879591951435,"node":"pve143","ssl_fingerprint":"05:A8:75:94:60:CB:0B:AF:76:8D:B5:94:00:B7:E9:C6:2F:45:49:34:7A:13:E8:03:78:19:87:81:55:FC:A5:28","maxmem":160513699840,"level":"","uptime":1584794,"maxdisk":72917082112}]}

Any hints how to debug the problem further?

Regards Lukas

Hi All,

I now figured out what leads to this ,JSONDecodeError(‘Expecting value: line 1 column 1 (char 0)’)" error.

I can check different proxmox clusters with no problem.
At that moment only 1 host is down in the cluster the agent will report the JsonDecode error.

Checking cluster wit one host down:

./share/check_mk/agents/special/agent_proxmox_ve '-u' 'root@pam' '-p' '******' '--port' 8006 '--no-cert-check' '192.168.120.171' 
Unhandled exception: JSONDecodeError('Expecting value: line 1 column 1 (char 0)')

All host up and running:

./share/check_mk/agents/special/agent_proxmox_ve '-u' 'root@pam' '-p' *****' '--port' 8006 '--no-cert-check' '192.168.120.171'  
WARNING 2021-08-20 14:51:50 cmk.special_agents.utils.misc: Cache: could not find file - start a new one
<<<<pve173>>>>
<<<proxmox_ve_node_info:sep(0)>>>
{"lxc": [], "proxmox_ve_version": {"release": "6.4", "repoid": "9f411e79", "version": "6.4-13"}, "qemu": ["101", "102", "103", "1100", "1101", "1102", "1103", "1300", "1302", "1401", "1413", "1422", "1431", "1451", "1453", "1454", "1481", "1501", "1601", "300", "302", "4
01", "411", "413", "422", "431", "451", "453", "454", "501", "601"], "status": "online", "subscription": {"status": "NotFound"}}
<<<proxmox_ve_mem_usage:sep(0)>>>
{"max_mem": 50537213952, "mem": 2474749952}
<<<uptime>>>
269
<<<<>>>>
<<<<pve172>>>>
.....


I get all the info as for other clusters also.

I think this should be trated as a bug.

Regards Lukas

1 Like

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.