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":"
"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'.