Zabbix Slack



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.

  1. The first one is the Slack Webhook URL you generated in step 1,
  2. 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 versionSlacks

Released:

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.

Zabbix Slack

In the WebUI of your zabbix server.

  1. [Configureation]

  2. [Action]

  3. Choose ‘Trigger’ at Event source and Create Action.

  4. if “Recovery message” checked, Uncheck the checkbox.

  5. At [Conditions] tab, add Trigger value = OK to Conditions.
    • Trigger value = OK and Trigger value = PROBLEM are in Conditions.
  6. 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.

Files for zbx2slack, version 0.1.1
Filename, sizeFile typePython versionUpload dateHashes
Filename, size zbx2slack-0.1.1.tar.gz (4.1 kB) File type Source Python version None Upload dateHashes

Zabbix Slack Not Working

Close

Hashes for zbx2slack-0.1.1.tar.gz

Zabbix Sap

Hashes for zbx2slack-0.1.1.tar.gz
AlgorithmHash digest
SHA256eb980ebcf85c03979e66456e4797d674677c68453cdfce0e53a0222f31ad84f2
MD5944f3cf6bd9ad599999a5aaa4ce6bc5a
BLAKE2-256cf3bc859681791c17a0c2114a83ff21c19d4613246a85d1b8b31791ac264149c