Action creation through API fails

XMLWordPrintable

    • Type: Incident report
    • Resolution: Fixed
    • Priority: Critical
    • 1.8.4
    • Affects Version/s: 1.8.3
    • Component/s: API (A)
    • None
    • Environment:
      Zabbix 1.8.3, using API from a PHP script

      Creating an action through the API fails. Below is a dump of the API call, and the response:

      {
      "auth":"2816c0428e78d70ec645c58663c6dcb3",
      "method":"action.create",
      "id":1,
      "params":[{
      "name":"puh24",
      "eventsource":0,
      "evaltype":0,
      "operations":[{
      "object":1,
      "objectid":"33",
      "operationtype":0,
      "shortdata":"

      {TRIGGER.NAME}: {STATUS}",
      "longdata":"{TRIGGER.NAME}

      :

      {STATUS}

      ",
      "default_msg":1,
      "mediatypeid":0,
      "esc_period":0,
      "esc_step_from":1,
      "esc_step_to":1,
      "evaltype":0,
      "opconditions":[],
      "opmediatypes":[]
      }]
      }],
      "jsonrpc":"2.0"
      }

      Got response from API:
      Fatal error: Call to undefined function validate_operation() in /Applications/MAMP/htdocs/zabbix-1.8.3/api/classes/class.caction.php on line 721

      This can be fixed by adding "require_once 'include/actions.inc.php';" to the top of 'class.caction.php'.

            Assignee:
            Unassigned
            Reporter:
            Walter Heck
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: