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

Reworked trigger API validation blocks usage of hostid

XMLWordPrintable

      Steps to reproduce:

      1. try to create a trigger over api**

      Result:

      ZabbixApi::ApiError: Server answer API error                          
             {
              "code": -32602,
              "message": "Invalid params.",
              "data": "Invalid parameter \"/1\": unexpected parameter \"hostid\"."
            }
             on request:
             {
              "method": "trigger.create",
              "params": [
                {
                  "description": "API down on {HOST.NAME}",
                  "expression": "{Template API:net.tcp.listen[{$API_LISTEN_PORT}].last()}=0 or {Template API:proc.mem[jsvc.exec,api,,api.pid].last()}=0 or {Template API:proc.num[jsvc.exec,api,,api.pid].last()}=0 or {Template API:web.test.fail[API Test].last()}=1",         
                  "hostid": 10271,
                  "comments": "API is down. Please restart container or service.\n",
                  "priority": 2,
                  "status": 0,
                  "type": 0,
                  "url": null
                }
              ],
              "id": 6324,
              "jsonrpc": "2.0",
              "auth": "b96f495f0ccc0958f5a338e7da480b9c"
            }
      Expected:

      • Trigger to be created successfully like with 4.0.28

            zabbix.dev Zabbix Development Team
            slehn Sebastian Schröder
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: