Today I’ve configured my Zabbix Server to automatically send alerts to the #alerting channel of my slack team.
To to this, you have to create un new Incoming WebHook in your slack Team.
Contribute to bageljp/zabbix-slack development by creating an account on GitHub. GitHub Gist: instantly share code, notes, and snippets.
- Click on your team, select App and Integration.
- Search for Incoming Webhook
- Click « Add a configuration »
- Configure the webhook with the default destination topic, etc.
- Copy the generated URL in your clipboard, you will need it later. The webhook url is something like https://hooks.slack.com/services/ABCDEFGHIJKJMNOPQRSTUVWXYZ
Next Go to your Zabbix Server.
Edit the /etc/zabbix/zabbix_server.conf file to specify a correct Path for AlertScriptPath, for example :
Then go to the /usr/share/zabbix/alertscripts directory and create a tiny shell script post_to_slack.sh :
Then Go to The Zabbix IHM and add a new media type of type script, with the script name you created before (Administration > Media Types > create media type)
Rigs of rods school bus. Add 2 parameters for your script : Where to watch if i stay.
- The first one is the Slack Webhook URL you generated in step 1,
- the second is the Alert Subject.
Then, Configure a Zabbix Actions (Configuration > Actions) to send a message to slack media for the admin user.
Set a correct Subject message to get all the information you need. For example :
Finaly edit the Zabbix admin user and add a new media of type slack.
That’s It !
Zabbix Slack Channel Not Found
Now all your Zabbix Alerts are sent to your slack #alerting Channel o/
PS : You can configure multiple slack media type to send alerts to multiple webhooks, according to the Host group.
Latest versionReleased:
command-line tool for Zabbix Alert Notification to Slack.
Project description
Zabbix Alert Notification Script for Slack. by pure python.
Can use by “Remote command”. But can’t use by “Media type”.
if use by python2.6 (like CentOS6.x), install argparse module. ex,
Install
In your zabbix server,
or you can download directly using wget, curl.
(if necessary, use sudo. )
set this script your zabbix server.
put file and add mode to execute.
Usage
get incoming-webhook url for your slack. from incoming webhook integration.
In the WebUI of your zabbix server.
[Configureation]
[Action]
Choose ‘Trigger’ at Event source and Create Action.
if “Recovery message” checked, Uncheck the checkbox.
- At [Conditions] tab, add Trigger value = OK to Conditions.
- Trigger value = OK and Trigger value = PROBLEM are in Conditions.
- At [Operations] tab, add Remote Command
Operation type : Remote Command
Targeta list : any host (ex. Current host)
Type : Custom script
Execute on : Zabbix server
Commands:
(if directly download, replace zbx2slack to zbx2slack.py.)
AUTHOR
Kei Iwasaki <me@laughk.org>
Zabbix Slack Integration
Release historyRelease notifications | RSS feed
0.1.1
Zabbix Cloud
0.1.0
0.0.1
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size zbx2slack-0.1.1.tar.gz (4.1 kB) | File type Source | Python version None | Upload date | Hashes |
Zabbix Slack Not Working
CloseHashes for zbx2slack-0.1.1.tar.gz
Zabbix Sap
Algorithm | Hash digest |
---|---|
SHA256 | eb980ebcf85c03979e66456e4797d674677c68453cdfce0e53a0222f31ad84f2 |
MD5 | 944f3cf6bd9ad599999a5aaa4ce6bc5a |
BLAKE2-256 | cf3bc859681791c17a0c2114a83ff21c19d4613246a85d1b8b31791ac264149c |