Ad Widget

Collapse

Zabbix 7.2 integration for Nagstamon tool.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ggs_admin
    Member
    • Oct 2021
    • 44

    #1

    Zabbix 7.2 integration for Nagstamon tool.

    Aloha everyone

    This is the second month is going when I'm trying to make Zabbix 7.2 work in the Nagstamon tool.

    I found the article here


    But can't make it works for me. I believe that there users configured something custom in the zabbix configuration in order to make it works.
    Since I'm using the default configuration and it doesn't work.

    Let me explain it in more detail:

    The error that I'm getting looks follow:
    Click image for larger version

Name:	438950761-75ef2ac8-94c5-4b53-9925-1d1febddf963.png
Views:	331
Size:	41.5 KB
ID:	503690

    it's an error from nagstamon debug log

    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)


    Here is a screenshot of the settings that I've used:

    Click image for larger version

Name:	447942255-350bdc7f-f271-4197-ab1b-42f3489da354.png
Views:	326
Size:	44.4 KB
ID:	503691



    here is a screenshot of the user in the zabbix dashboard

    I've tried to use chatgpt in order to solve this issue but

    Click image for larger version

Name:	447943014-1e3f746d-d64e-473c-984c-e68fae1cfbe0.png
Views:	282
Size:	83.9 KB
ID:	503692



    here is from API area

    Click image for larger version

Name:	447943603-284852d4-f4df-4a5e-ad95-0cf3d3b3125c.png
Views:	280
Size:	23.3 KB
ID:	503693

    In order to make sure that there is no issue with my zabbix user I have added it to ZabbixVue extension (through API key)

    Click image for larger version

Name:	447947282-b0dfcdc1-6896-4396-bf25-6cbf0ea81ff1.png
Views:	277
Size:	82.7 KB
ID:	503694

    PS: zabbix 5 works properly in the nagstamon also.

    Has anyone had such an issue?
    I've already contacted Nagstamon developers: They have installed Zabbix 7.2 and successfully added it to Nagstamon. They don't provide any information on which settings they used, so I have no idea where the root of this issue..​
    Attached Files
Working...