Skip to content

Zabbix7.2 doesn't work in Nagstamon 3.16 #1107

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
project57ua opened this issue Apr 24, 2025 · 4 comments
Open

Zabbix7.2 doesn't work in Nagstamon 3.16 #1107

project57ua opened this issue Apr 24, 2025 · 4 comments

Comments

@project57ua
Copy link

I've added the zabbix7.2 to the latest version of nagstamon but it doesn't work.

Image

Nagstamon.thirdparty.zabbix_api.ZabbixAPIException: (Error -32600: Invalid request., Invalid parameter "/": unexpected parameter "auth". while sending ("jsonrp": "2.0", "method": "trigger.get", "params". ("only_true": true,

Would you plan to add the authorization through API key in the next Nagstamon update?

@project57ua
Copy link
Author

@HenriWahl pls let me know if you plan to fix that bug in the next update) many thanks

@HenriWahl
Copy link
Owner

@project57ua can you please try the current testing release?

@project57ua
Copy link
Author

@HenriWahl thank you for your response.
Yeah I've updated the Nagtsamon 3.17 to the error code a little bit changed

Image

it's an error from debug log

Nagstamon.thirdparty.zabbix_api.ZabbixAPIException: ('Error -32602: Invalid params., Not authorized. while sending {"jsonrpc": "2.0", "method": "trigger.get", "params": {"only_true": true, "skipDependent": true, "monitored": true, "active": true, "output": ["triggerid", "description", "lastchange", "manual_close"], "selectLastEvent": ["eventid", "name", "ns", "clock", "acknowledged", "value", "severity"], "selectHosts": ["hostid", "host", "name", "status", "available", "maintenance_status", "maintenance_from"], "selectItems": ["name", "lastvalue", "state", "lastclock"], "filter": {"value": 1}}, "id": 18}', -32602)

I've tried to use different setting like Bearer and use Token for accessing but no luck...
In order to exclude that this issue is related to the zabbix side I have added the same user to browser's extension named Zabbix Vue and it works properly there.

@project57ua
Copy link
Author

here is more information from debug logs if it's useful

` tail -n 40 /home/paul/nagstamon.log
return self.parent.do_request(req)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/Nagstamon/thirdparty/zabbix_api.py", line 301, in do_request
raise ZabbixAPIException(msg, jobj['error']['code'])
Nagstamon.thirdparty.zabbix_api.ZabbixAPIException: ('Error -32602: Invalid params., Not authorized. while sending {"jsonrpc": "2.0", "method": "trigger.get", "params": {"only_true": true, "skipDependent": true, "monitored": true, "active": true, "output": ["triggerid", "description", "lastchange", "manual_close"], "selectLastEvent": ["eventid", "name", "ns", "clock", "acknowledged", "value", "severity"], "selectHosts": ["hostid", "host", "name", "status", "available", "maintenance_status", "maintenance_from"], "selectItems": ["name", "lastvalue", "state", "lastclock"], "filter": {"value": 1}}, "id": 33}', -32602)

ERROR: 2025-04-29 23:07:21.027375 Zabbix7.2 Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/Nagstamon/Servers/Zabbix.py", line 157, in _get_status
services = self.zapi.trigger.get({'only_true': True,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/Nagstamon/thirdparty/zabbix_api.py", line 344, in method
return self.universal("%s.%s" % (self.data["prefix"], name), opts[0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/Nagstamon/thirdparty/zabbix_api.py", line 79, in wrapper
return self.do_request(self.json_obj(method, opts))['result']
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/Nagstamon/thirdparty/zabbix_api.py", line 351, in do_request
return self.parent.do_request(req)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/Nagstamon/thirdparty/zabbix_api.py", line 301, in do_request
raise ZabbixAPIException(msg, jobj['error']['code'])
Nagstamon.thirdparty.zabbix_api.ZabbixAPIException: ('Error -32602: Invalid params., Not authorized. while sending {"jsonrpc": "2.0", "method": "trigger.get", "params": {"only_true": true, "skipDependent": true, "monitored": true, "active": true, "output": ["triggerid", "description", "lastchange", "manual_close"], "selectLastEvent": ["eventid", "name", "ns", "clock", "acknowledged", "value", "severity"], "selectHosts": ["hostid", "host", "name", "status", "available", "maintenance_status", "maintenance_from"], "selectItems": ["name", "lastvalue", "state", "lastclock"], "filter": {"value": 1}}, "id": 35}', -32602)

ERROR: 2025-04-29 23:07:47.109748 Zabbix7.2 Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/Nagstamon/Servers/Zabbix.py", line 157, in _get_status
services = self.zapi.trigger.get({'only_true': True,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/Nagstamon/thirdparty/zabbix_api.py", line 344, in method
return self.universal("%s.%s" % (self.data["prefix"], name), opts[0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/Nagstamon/thirdparty/zabbix_api.py", line 79, in wrapper
return self.do_request(self.json_obj(method, opts))['result']
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/Nagstamon/thirdparty/zabbix_api.py", line 351, in do_request
return self.parent.do_request(req)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/Nagstamon/thirdparty/zabbix_api.py", line 301, in do_request
raise ZabbixAPIException(msg, jobj['error']['code'])
Nagstamon.thirdparty.zabbix_api.ZabbixAPIException: ('Error -32602: Invalid params., Not authorized. while sending {"jsonrpc": "2.0", "method": "trigger.get", "params": {"only_true": true, "skipDependent": true, "monitored": true, "active": true, "output": ["triggerid", "description", "lastchange", "manual_close"], "selectLastEvent": ["eventid", "name", "ns", "clock", "acknowledged", "value", "severity"], "selectHosts": ["hostid", "host", "name", "status", "available", "maintenance_status", "maintenance_from"], "selectItems": ["name", "lastvalue", "state", "lastclock"], "filter": {"value": 1}}, "id": 37}', -32602)
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants