From 54cff79acbedb60280f85d30f806e7e050406359 Mon Sep 17 00:00:00 2001 From: laf Date: Fri, 27 Feb 2015 15:36:12 +0000 Subject: [PATCH] Added docs for slack transport --- doc/Extensions/Alerting.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/doc/Extensions/Alerting.md b/doc/Extensions/Alerting.md index 02e9ea6c3..ddeddb34f 100644 --- a/doc/Extensions/Alerting.md +++ b/doc/Extensions/Alerting.md @@ -11,6 +11,7 @@ Table of Content: - [API](#transports-api) - [Nagios-Compatible](#transports-nagios) - [IRC](#transports-irc) + - [Slack](#transports-slack) # About @@ -170,3 +171,13 @@ Configuration of the LibreNMS IRC-Bot is described [here](https://github.com/lib $config['alert']['transports']['irc'] = true; ``` +## Slack + +The Slack transport will POST the alert message to your Slack Incoming WebHook, you are able to specify multiple webhooks along with the relevant options to go with it. All options are optional, the only required value is for url, without this then no call to Slack will be made. Below is an example of how to send alerts to two channels with different customised options: + +```php +$config['alert']['transports']['slack']['post'][] = array('url' => "https://hooks.slack.com/services/A12B34CDE/F56GH78JK/L901LmNopqrSTUVw2w3XYZAB4C", 'channel' => '#Alerting'); + +$config['alert']['transports']['slack']['post'][] = array('url' => "https://hooks.slack.com/services/A12B34CDE/F56GH78JK/L901LmNopqrSTUVw2w3XYZAB4C", 'channel' => '@john', 'username' => 'LibreNMS', 'icon_emoji' => ':ghost:'); + +```