About

Zabbix Server Action to Slack.com

Zabbix Server to Slack.com

Installation

Slack.com settings

Slak.com Incoming Webhooks

Script settings in Zabbix Server

cd /usr/lib/zabbix/alertscripts    # AlertScriptsPath
wget https://raw.githubusercontent.com/bageljp/zabbix-slack/master/slack.sh
chmod a+x slack.sh
vi slack.sh
slack_url slack integration url. (ex. https://hooks.slack.com/services/XXX/XXXX/XXXXX)
slack_username slack post username.
emoji slack emoji.
zabbix_baseurl full URL of zabbix mainpage
zabbix_username zabbix username to grab the chart
zabbix_password zabbix password
chart_period how many seconds to be shown on the chart
chart_width width of the chart
chart_height height of the chart
chart_baseurl where the charts will be hosted
chart_basedir charts will be downloaded there

Zabbix Server Web Interface settings

  • Administration MediaType

Zabbix Server MediaType settings

  • Action settings default message

Zabbix Server Action settings

  • copy and paste.
HOST: {HOST.NAME}
TRIGGER_NAME: {TRIGGER.NAME}
TRIGGER_STATUS: {TRIGGER.STATUS}
TRIGGER_SEVERITY: {TRIGGER.SEVERITY}
DATETIME: {DATE} / {TIME}
ITEM_ID: {ITEM.ID1}
ITEM_NAME: {ITEM.NAME1}
ITEM_KEY: {ITEM.KEY1}
ITEM_VALUE: {ITEM.VALUE1}
EVENT_ID: {EVENT.ID}
TRIGGER_URL: {TRIGGER.URL}