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

zabbix api triggers.get seems to ignore triggerids

    XMLWordPrintable

Details

    • Incident report
    • Status: Closed
    • Trivial
    • Resolution: Won't fix
    • None
    • None
    • None
    • None

    Description

      Using the py-zabbix api library which is passing the correct params, but the API seems to ignore triggerids

       

      I've tried:

      triggers = zapi.trigger.get(
          hostids=hosts_id,
          filter={
              "templateids": "12345")
          }
      )
      urllib2.Request(https://<url>/api_jsonrpc.php, {"jsonrpc": "2.0", "method": "trigger.get", "params": {"hostids": ["<id>"], "filter": {"templateids": "<id>"}}, "id": "1", "auth": "********"})
      

       

      I've tried:

      triggers = zapi.trigger.get(
          hostids=hosts_id,
          templateids = str(template_trigger["templateid"])
      ) 
      urllib2.Request(https://<url>/api_jsonrpc.php, {"jsonrpc": "2.0", "method": "trigger.get", "params": {"hostids": ["<id>"], "templateids": "<id>"}, "id": "1", "auth": "********"}) 

      I also tried this in postman with direct requests and in all cases I'm getting the entire list of triggers, not just the one specified as the templateids

       

      Attachments

        Activity

          People

            zabbix.support Zabbix Support Team
            minsis Dennis Whitney
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: