slack.py
is one of zabbix alertscripts to send alert message for slack without any libraries.
You do not need to install any libraries or packages.
- work on python 2/3
In generaly, place src/slack.py
on /usr/lib/zabbix/alertscripts/
Set 2 parameters.
{ALERT.SENDTO}
{ALERT.MESSAGE}
Set default message.
{
"date": "{DATE} / {TIME}",
"host": "{HOST.NAME}",
"name": "{TRIGGER.NAME}",
"url": "{TRIGGER.URL}",
"status": "{TRIGGER.STATUS}",
"triage": "{TRIGGER.SEVERITY}",
"item_name": "{ITEM.NAME}",
"item_value": "{ITEM.VALUE}"
}
TRIGGER.URL
do not work well. Setting your zabbix dashboard page is recommended.
Set slack media and send to slack incoming webhook URL.
Check your hooked slack channel!!
If it do not work well, you can check how to pass arguments on Action log.
MIT