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

Zabbix API filter by tag

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • None
    • None
    • None
    • Software

      Hi,

      I'm attempting to use the filter parameter in the Zabbix API on tags. However I am not managing to filter them out. For instance if I have

              {
                  "triggerid": "55741",
                  "expression": "{79335}>0",
                  "description": "desc",
                  "url": "asdf",
                  "status": "1",
                  "value": "0",
                  "priority": "5",
                  "lastchange": "0",
                  "comments": "",
                  "error": "",
                  "templateid": "22803",
                  "type": "0",
                  "state": "0",
                  "flags": "0",
                  "recovery_mode": "0",
                  "recovery_expression": "",
                  "correlation_mode": "0",
                  "correlation_tag": "",
                  "manual_close": "0",
                  "tags": [
                      {
                          "tag": "site",
                          "value": "dr"
                      }
                  ]
              }
      

      and I would like to filter out all the triggers with the tags, "site" and "dr". How would I do so?

      I attempted something like this

         "filter":{
      		"tags":[{"tag": "site","value": "dr"}]
                  }
      

      But that did not work.

      Any ideas please? Thanks.

            Unassigned Unassigned
            braden.borg Braden Borg
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: