> Alert object

The following objects are directly related to the alert API.

Alert

Alerts are created by Zabbix server and cannot be modified via the API.

The alert object contains information about whether certain action operations have been executed successfully. It has the following properties.

PropertyTypeDescription
alertidstringID of the alert.
actionidstringID of the action that generated the alert.
alerttypeintegerAlert type.

Possible values:
0 - message;
1 - remote command.
clocktimestampTime when the alert was generated.
errorstringError text if there are problems sending a message or running a command.
esc_stepintegerAction escalation step during which the alert was generated.
eventidstringID of the event that triggered the action.
mediatypeidstringID of the media type that was used to send the message.
messagetextMessage text.

Property behavior:
- supported if alerttype is set to “message”
retriesintegerNumber of times Zabbix tried to send the message.
sendtostringAddress, user name or other identifier of the recipient.

Property behavior:
- supported if alerttype is set to “message”
statusintegerStatus indicating whether the action operation has been executed successfully.

Possible values if alerttype is set to “message”:
0 - message not sent;
1 - message sent;
2 - failed after a number of retries;
3 - new alert is not yet processed by alert manager.

Possible values if alerttype is set to “remote command”:
0 - command not run;
1 - command run;
2 - tried to run the command on Zabbix agent, but it was unavailable.
subjectstringMessage subject.

Property behavior:
- supported if alerttype is set to “message”
useridstringID of the user that the message was sent to.
p_eventidstringID of problem event, which generated the alert.
acknowledgeidstringID of acknowledgment, which generated the alert.