Ad Widget

Collapse

Problems via API not in sync with Zabbix Web UI

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • StormScorpion
    Junior Member
    • Feb 2024
    • 22

    #1

    Problems via API not in sync with Zabbix Web UI

    We use Zabbix API (problem.get) to integrate Zabbix with our Jira instance. We get problems reported for hosts via API that are not visible in Web ui.

    I was able to reproduce this issue:
    1. Create host, discover items like filesystems
    2. Trigger an alert by filling disk space
    3. Disable the disk space trigger or item
    4. Zabbix wont show you the disk full alert, but problem.get for this host will still report this problem
    Are we doing something wrong? Or is this something that Zabbix does not handle well?

    Code:
    {
    "jsonrpc": "2.0",
    "method": "problem.get",
    "params": {
    "hostids": [
    1234
    ],
    "output": "extend",
    "sortfield": [
    "eventid"
    ],
    "severities": [
    2,
    3,
    4,
    5
    ],
    "sortorder": "DESC",
    "symptom": false,
    "suppressed": false
    },
    "id": 1
    }
  • Answer selected by StormScorpion at 11-12-2025, 11:10.
    Andrejs Poddubņaks
    Junior Member
    • Nov 2025
    • 18

    Hi!
    When you disable a trigger or item:
    - The frontend hides its problems
    - but the problem events stay in the DB, so problem.get still returns them. This is clearly described in the documentation on triggers:
    Click image for larger version

Name:	image.png
Views:	60
Size:	44.8 KB
ID:	508993
    From official Zabbix documentation (Zabbix 7.4) https://www.zabbix.com/documentation...hosts/triggers

    ​If you need the API to provide the same data as the Web UI, you need to repeat the logic on your side:
    1. First, call problem.get as you do now.
    2. Take objectid (triggerid) from the results and do trigger.get with the filter status: 0 (enabled) and, if necessary, selectHosts to check that the host is not disabled.
    3. When integrating with Jira, only leave problems whose triggers/hosts are enabled.

    Comment

    • Andrejs Poddubņaks
      Junior Member
      • Nov 2025
      • 18

      #2
      Hi!
      When you disable a trigger or item:
      - The frontend hides its problems
      - but the problem events stay in the DB, so problem.get still returns them. This is clearly described in the documentation on triggers:
      Click image for larger version

Name:	image.png
Views:	60
Size:	44.8 KB
ID:	508993
      From official Zabbix documentation (Zabbix 7.4) https://www.zabbix.com/documentation...hosts/triggers

      ​If you need the API to provide the same data as the Web UI, you need to repeat the logic on your side:
      1. First, call problem.get as you do now.
      2. Take objectid (triggerid) from the results and do trigger.get with the filter status: 0 (enabled) and, if necessary, selectHosts to check that the host is not disabled.
      3. When integrating with Jira, only leave problems whose triggers/hosts are enabled.

      Comment

      Working...