From 5326cb3bd5745921d686abebb9df26ec4e0c418c Mon Sep 17 00:00:00 2001 From: Neil Lathwood Date: Wed, 1 Feb 2017 08:25:23 +0000 Subject: [PATCH] added docs for rocket.chat (#5702) --- doc/Extensions/Alerting.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/doc/Extensions/Alerting.md b/doc/Extensions/Alerting.md index 39f1dccebf..95777ce7c2 100644 --- a/doc/Extensions/Alerting.md +++ b/doc/Extensions/Alerting.md @@ -16,6 +16,7 @@ Table of Content: - [Nagios-Compatible](#transports-nagios) - [IRC](#transports-irc) - [Slack](#transports-slack) + - [Rocket.chat](#transports-rocket) - [HipChat](#transports-hipchat) - [PagerDuty](#transports-pagerduty) - [Pushover](#transports-pushover) @@ -307,6 +308,19 @@ $config['alert']['transports']['slack'][] = array('url' => "https://hooks.slack. ``` ~~ +## Rocket.chat + +[Using a proxy?](../Support/Configuration.md#proxy-support) + +The Rocket.chat transport will POST the alert message to your Rocket.chat Incoming WebHook using the [attachments](https://rocket.chat/docs/developer-guides/rest-api/chat/postmessage) option, you are able to specify multiple webhooks along with the relevant options to go with it. Simple html tags are stripped from the message. All options are optional, the only required value is for url, without this then no call to Rocket.chat will be made. Below is an example of how to send alerts to two channels with different customised options: + +```php +$config['alert']['transports']['rocket'][] = array('url' => "https://rocket.url/api/v1/chat.postMessage", 'channel' => '#Alerting'); + +$config['alert']['transports']['rocket'][] = array('url' => "https://rocket.url/api/v1/chat.postMessage", 'channel' => '@john', 'username' => 'LibreNMS', 'icon_emoji' => ':ghost:'); + +``` + ## HipChat > You can configure these options within the WebUI now, please avoid setting these options within config.php