See www.zabbix.com for the official Zabbix site.

Docs/DB schema/3.4/alerts

From Zabbix.org
Jump to: navigation, search

This table contains generated alerts (both messages and remote commands).

Columns

Column Detail Default NULL? Type Ref from Ref to
alertid Alert (message or remote command) ID. Managed by Zabbix via the ids table. NONE NOT NULL id task_remote_command.alertid
actionid ID of the action that resulted in this alert. NONE NOT NULL id actions.actionid C
eventid ID of the event that resulted in this alert. NONE NOT NULL id events.eventid C
userid ID of the target user for the message. NONE NULL id users.userid C
clock Unix timestamp when the alert was generated. 0 NOT NULL time
mediatypeid
  • NULL - no media type associated
  • number - ID of the media type
NONE NULL id media_type.mediatypeid C
sendto "Send to" field from the frontend - email address, phone number, script name or any other identifier. EMPTY NOT NULL varchar(100)
subject Subject from action properties. EMPTY NOT NULL varchar(255)
message
  • For type = ALERT_TYPE_MESSAGE - message from action properties.
  • For type = ALERT_TYPE_COMMAND - remote commands.
EMPTY NOT NULL text
status Alert status.

For messages:

  • 0 - ALERT_STATUS_NOT_SENT (unsent, but already handled by the alert manager)
  • 1 - ALERT_STATUS_SENT
  • 2 - ALERT_STATUS_FAILED
  • 3 - ALERT_STATUS_NEW (freshly generated, not handled by the alert manager yet)

For remote commands:

  • 0 - ALERT_STATUS_NOT_SENT
  • 1 - ALERT_STATUS_SENT
  • 2 - ALERT_STATUS_FAILED
0 NOT NULL integer
retries How many retries are left. Reduced after every failure and set to 0 upon success. 0 NOT NULL integer
error Error message.

Used when status = ALERT_STATUS_FAILED.

EMPTY NOT NULL varchar(2048)
esc_step Escalation step that resulted in this alert. 0 NOT NULL integer
alerttype Alert type.
  • 0 - ALERT_TYPE_MESSAGE
  • 1 - ALERT_TYPE_COMMAND
0 NOT NULL integer
p_eventid
  • NULL - alert for a PROBLEM event.
  • number - ID of the originating problem event for an OK event.
NONE NULL id events.eventid C
acknowledgeid Acknowledgement ID. NONE NULL id acknowledges.acknowledgeid C

Indexes

Name UNIQ Columns
PRIMARY KEY YES alertid
alerts_1 No actionid
alerts_2 No clock
alerts_3 No eventid
alerts_4 No status
alerts_5 No mediatypeid
alerts_6 No userid
alerts_7 No p_eventid