Skip to content
This repository has been archived by the owner on Jul 5, 2022. It is now read-only.

Commit

Permalink
fix errors in notification command and update to new config file
Browse files Browse the repository at this point in the history
  • Loading branch information
mcinquin committed Jan 10, 2016
1 parent 9fa024e commit 4f2baec
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,16 @@ centreon-notifications
# Setup

1. Set up an incoming webhook integration in your Slack team : [Slack incoming webhook integration](https://api.slack.com/incoming-webhooks)
2. Download the scripts in the plugins directory and modify these following variables :
* $centreon_url : URL of the Centreon Web UI ( eg. https://centreon.foo.bar:8081 )
* $slack_posturl : URL of incoming webhook ( eg. https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX )
* $slack_username : Integration's username (eg. Centreon)
3. Don't miss install the following Perl modules : HTTP::Request::Common, LWP::UserAgent, JSON, Getopt::Long.
4. Make the files executable.
2. Download the scripts in the plugins directory
3. Take config.ini.example as a template, create a file config.ini in same directory and correct configuration according to your preferences:
* centreon_url : URL of the Centreon Web UI ( eg. https://centreon.foo.bar:8081 )
* slack_posturl : URL of incoming webhook ( eg. https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX )
* slack_username : Integration's username (eg. Centreon)
* slack_emoji_post : Emoji for each post
4. Don't miss install the following Perl modules : HTTP::Request::Common, LWP::UserAgent, JSON, Getopt::Long.
5. Create two new notification's command, host-notify-by-slack and service-notify-by-slack :
* `$USER1$/host-slack.pl --host="$HOSTNAME$" --state="$HOSTSTATE$" --address="$HOSTADDRESS$" --channel="#channelofyourchoice"`
* `$USER1$/service-slack --host="$HOSTNAME$" --address="$HOSTADDRESS$" --output="$SERVICEOUTPUT$" --service="$SERVICEDESC$" --state="$SERVICESTATE$" --channel="#channelofyourchoice"`
* `perl /directoryofplugins/centreon-notifications/slack/host-slack.pl --host="$HOSTNAME$" --state="$HOSTSTATE$" --address="$HOSTADDRESS$" --channel="#channelofyourchoice"`
* `perl /directoryofplugins/centreon-notifications/slack/service-slack --host="$HOSTNAME$" --address="$HOSTADDRESS$" --output="$SERVICEOUTPUT$" --service="$SERVICEDESC$" --state="$SERVICESTATE$" --channel="#channelofyourchoice"`
6. Adapt your notification's configuration for using theses new commands
7. Generate, move and export the new configuration on your all pollers

Expand Down

0 comments on commit 4f2baec

Please sign in to comment.