Skip to content

Latest commit

 

History

History
63 lines (38 loc) · 1.21 KB

README.md

File metadata and controls

63 lines (38 loc) · 1.21 KB

slack.py

slack.py is one of zabbix alertscripts to send alert message for slack without any libraries.

Requirements

You do not need to install any libraries or packages.

  • work on python 2/3

Usage

Place this scripts

In generaly, place src/slack.py on /usr/lib/zabbix/alertscripts/

On media types

Set 2 parameters.

  • {ALERT.SENDTO}
  • {ALERT.MESSAGE}

On actions

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.

On user profile/Media

Set slack media and send to slack incoming webhook URL.

Verify

Check your hooked slack channel!!

If it do not work well, you can check how to pass arguments on Action log.

LICENSE

MIT