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

filter on trigger.get doesn't work

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Commercial support required
    • Icon: Trivial Trivial
    • None
    • 6.0.2
    • Frontend (F)
    • None

      Steps to reproduce:

      This same code works in zabbix 3.4, and before you tell me to just read the docs, I would find it helpful on how to write the json to get what I need.   That hostid is the id of a template that contains the trigger. 

       {
          "jsonrpc": "2.0",
           "method": "trigger.get",
          "params": {
              "hostids": 13216,
               "filter":
                   { "description": "{HOST.HOST}: healthcheck non-200 status code" },
               "output": [
                  "description"
              ]
          },
      
        "id": 1,
        "auth": "{{auth}}"
       }
      

      Returns the following in zabbix 3.4

      {
          "jsonrpc": "2.0",
          "result": [
              {
                  "triggerid": "444967",
                  "description": "{HOST.HOST}: healthcheck non-200 status code"
              }
          ],
          "id": 1
      }
      

      but same json query in zabbix 6.0.2 returns all the triggers on the template

      {
          "jsonrpc": "2.0",
          "result": [
              {
                  "triggerid": "444966",
                  "description": "{HOST.HOST}: has a events file waiting"
              },
              {
                  "triggerid": "444967",
                  "description": "{HOST.HOST}: healthcheck non-200 status code"
              },
              {
                  "triggerid": "444968",
                  "description": "{HOSTNAME} test-app env.properties changed"
              },
              {
                  "triggerid": "444969",
                  "description": "{HOSTNAME} test app chef override exists"
              },
              {
                  "triggerid": "495481",
                  "description": "{HOST.HOST}: couldn't ping external site"
              },
              {
                  "triggerid": "495482",
                  "description": "{HOST.HOST}: couldn't ping external site"
              },
              {
                  "triggerid": "495483",
                  "description": "{HOST.HOST}: error in ping configuration"
              }
          ],
          "id": 1
      }

            atocko Andrey Tocko
            bunkzilla bunkzilla
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: