Skip to content

liutyi/zabbix-slack

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

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
mkdir /usr/share/zabbix/slack/
chown zabbix:zabbix /usr/share/zabbix/slack/
chmod 755 /usr/share/zabbix/slack/
vi slack.sh
vi /etc/httpd/conf.d/zabbix.conf

/etc/httpd/conf.d/zabbix.conf

<Directory "/usr/share/zabbix/slack">
    Require all granted
</Directory>
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}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%