Skip to content
This repository has been archived by the owner on Nov 1, 2018. It is now read-only.
/ zabbix-slack Public archive

Zabbix alert script for Slack

License

Notifications You must be signed in to change notification settings

emgag/zabbix-slack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zabbix alert script for Slack

Requirements

  • Python 2

Installation

  • Set up a new incoming webhook for your Slack team
  • Set token in slack.cfg (the part in the URL after https://hooks.slack.com/services/)
  • Review other configuration options in slack.cfg. Check out subject matching regular expressions for status color support in Slack messages. To match for trigger severity, make sure this info is included in the subject, default configuration matches following subject:
[{TRIGGER.STATUS}] ({TRIGGER.SEVERITY}): {TRIGGER.NAME}
  • Create new media type in Zabbix

Media Type

  • Copy slack.py and slack.cfg to /usr/lib/zabbix/alertscripts
  • Make slack.py executable for the user running Zabbix server

Usage

Zabbix

Use receiving user or channel in the Send to field when adding a new media for a user.

CLI

usage: slack.py [-h] [-v] [-c [C]] to subject message

Zabbix Slack Client

positional arguments:
  to             Receiving user or channel
  subject        Message subject
  message        Message body

optional arguments:
  -h, --help     show this help message and exit
  -v, --version  show program's version number and exit
  -c [C]         The configuration file to use (default: slack.cfg)

License

zabbix-slack is licensed under the MIT License.

Releases

No releases published

Packages

No packages published

Languages