Zabbix Documentation 1.8

2.23.04.04.2 (current)In development:4.4 (devel)Unsupported:1.82.02.43.23.4

User Tools

Site Tools


Sidebar

api:action

Action

Methods

Class containing methods for operations with Actions.

MethodsDescription
get() Get action details
exists() Check if action exists
create() Create actions
update() Update action details
delete() Delete actions

Object details

The table contains complete list of Action attributes.

Action

ParameterTypeDescriptionDetails
actionidinteger Action ID
namestring Name
eventsourceinteger Event source Triggers / Discovery / Auto registration
evaltypeinteger Height
statusinteger Status Enabled/Disabled
esc_periodinteger Default escalation period
def_shortdatastring Default message subject
def_longdatastring Default message
recovery_msginteger Send recovery message On/Off
r_shortdatastring Default recovery message subject
r_longdatastring Default message subject

Conditions

ParameterTypeDescriptionDetails
conditionidinteger Condition ID
actionidinteger Action ID
conditiontypeinteger Condition type
operatorinteger Comparision type
valuestring Condition value

Operations

operationidinteger Condition ID
actionidinteger Action ID
operationtypeinteger Condition type
objectinteger Comparision type
objectidinteger Condition value
shortdatastring Custom message subject
longdatastring Custom message
esc_periodinteger Custom escalation period
esc_step_frominteger Escalation step start from
esc_step_tointeger Escalation step end on
default_msginteger Use default mesages On/Off
evaltypestring Default recovery message subject

Operation media types

opmediatypeidinteger Operation media type ID
operationidinteger Operation ID
mediatypeidinteger Media type ID
opconditionidinteger Operation Condition ID
operationidinteger Operation ID
conditiontypeinteger Condition Type
operatorinteger Operator
vaelueinteger Value

Common tasks

The table contains list of common action-related tasks and possible implementation using Zabbix API

TaskHOWTO
Add an action Use method action.create
Add a bunch of new actions Use method action.create with array of Action objects
Remove action by Action IDs Use method action.delete array of Action IDs
Retrieve action details by Action IDs Use method action.get with parameter actionids
Retrieve action details by Action name Use method action.get with parameter filter, specify “name”:“<your action>“