Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-15530

API trigger.get does not return triggers without Zabbix agent

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • 4.0.3
    • API (A)
    • None

      Steps to reproduce:

      1. Setup host with just a check for SSH availability
      2. Take host offline
      3. Query triggers.get API

      Result:
      Dashboard shows trigger under current problems correctly

      Trigger is absent in the API results, while triggers with Zabbix agent hosts are returned

      Expected:
      All triggers shown in the Dashboard are returned via API

       

      This is the used query:

       

      $jsonData = array(
       'jsonrpc' => '2.0',
       'method' => 'trigger.get',
       'params' => array(
       'output' => array(
       'description',
       'value',
       'status',
       ),
       'selectHosts' => array(
       'host'
       ),
       'selectItems' => array(
       'lastvalue',
       'units'
       ),
       'filter' => array (
       'value' => 1,
       'status' => 0
       ),
       'sortfield' => 'priority',
       'sortorder' => 'DESC'
       ),
       'id' => 2,
       'auth' => $token
       );
       
      

      Removing selectHosts does not help.

        1. raw-values.png
          raw-values.png
          19 kB
        2. two-triggers-on-fire.png
          two-triggers-on-fire.png
          9 kB
        3. zabbix_15530_2.PNG
          zabbix_15530_2.PNG
          83 kB
        4. zabbix_15530.PNG
          zabbix_15530.PNG
          53 kB
        5. zbx_export_templates.xml
          4 kB

            aigars.kadikis Aigars Kadikis
            ivo.burkart Ivo Burkart
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: