- Download the scripts in the plugins directory and modify these following variables :
- $url : URL of the Centreon Web UI ( eg. https://centreon.foo.bar:8081 )
- $from : from email address desired
- Make the files executable.
- On distributed platform, don't miss to install php on your pollers
- Change the command line for host-notify-by-email and service-notify-by-email notification's command :
$USER1$/host-email.php "$NOTIFICATIONTYPE$" "$HOSTNAME$" "$HOSTALIAS$" "$HOSTSTATE$" "$HOSTADDRESS$" "$HOSTOUTPUT$" "$LONGDATETIME$" "$SERVICEDESC$" "$SERVICESTATE$" "$CONTACTEMAIL$" "$TOTALHOSTSUP$" "$TOTALHOSTSDOWN$" "$HOSTACKAUTHOR$" "$HOSTACKCOMMENT$"
$USER1$/service-email.php "$NOTIFICATIONTYPE$" "$HOSTNAME$" "$HOSTALIAS$" "$HOSTSTATE$" "$HOSTADDRESS$" "$SERVICEOUTPUT$" "$LONGDATETIME$" "$SERVICEDESC$" "$SERVICESTATE$" "$CONTACTEMAIL$" "$SERVICEDURATIONSEC$" "$SERVICEEXECUTIONTIME$" "$TOTALSERVICESWARNING$" "$TOTALSERVICESCRITICAL$" "$TOTALSERVICESUNKNOWN$" "$LASTSERVICEOK$" "$LASTSERVICEWARNING$" "$SERVICENOTIFICATIONNUMBER$" "$SERVICEACKAUTHOR$" "$SERVICEACKCOMMENT$"
- Generate, move and export the new configuration on your all pollers
- centreon-notifications is a fork of nagios-notifications. nagios-notifications is originally written by seancdugan at nagios-notifications.
- Set up an incoming webhook integration in your Slack team : Slack incoming webhook integration
- Download the scripts in the plugins directory
- 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
- Don't miss install the following Perl modules : HTTP::Request::Common, LWP::UserAgent, JSON, Getopt::Long, Config::General.
- Create two new notification's command, host-notify-by-slack and service-notify-by-slack :
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"
- Adapt your notification's configuration for using theses new commands
- Generate, move and export the new configuration on your all pollers