Through ZabbixAPI failed to create action.
execute command line parameters?
method = "action.create",
params = {
"name": "Trigger action",
"eventsource": 0,
"status": 0,
"esc_period": 120,
"def_shortdata": "{TRIGGER.NAME}: {TRIGGER.STATUS}",
"def_longdata": "{TRIGGER.NAME}: {TRIGGER.STATUS}\r\nLast value: {ITEM.LASTVALUE}\r\n\r\n{TRIGGER.URL}",
"filter": {
'evaltype': 0,
"conditions": [
{
"conditiontype": 4,
"operator": 5,
"value": "2"
}
]
},
"operations": [
{
"operationtype": 0,
"opmessage_grp": [
{
"usrgrpid": "7"
}
],
"opmessage": {
"default_msg": 1,
"mediatypeid": "0"
}
}
]
}
# pprint(params)
result = zbx_api.get_http(method, params)
pprint(result)
execute command return:
{u'message': u'Invalid params.', u'code': -32602, u'data': u'Incorrect API "".'}