Page 1 of 1

Slack Integration

Posted: Fri Nov 18, 2016 5:29 am
by seckin.aktas
Hi,

I want to sent nagios alarts to slack, became a notify. I tried many document but doesn't work

How to I sent nagios alart to slack? :cry:

Thank you

Re: Slack Integration

Posted: Fri Nov 18, 2016 11:23 am
by dwhitfield
Please post a few of the service definition files as well as the contacts.cfg (scrub any sensitive data please) so we can confirm they are at least correctly configured.
What do you see under Reports > Notifications? --- Is Nagios sending out notifications for the services or do you just see notifications for the one host?

Before you implemented Slack, were you receiving email notifications for all host / service checks?. If not, we should correct that 1st and then you can move on to using Slack, but I'm not sure how much we can help you with Slack though.

What version of Nagios are you using? What version of slack? Could you post some (preferably all) the documents you used to try to set this up? That will help us "reverse engineer" what is going on. Thanks!

Re: Slack Integration

Posted: Mon Nov 21, 2016 12:42 am
by seckin.aktas
Hi,

I used this doc. http://matthewcmcmillan.blogspot.com.tr ... -with.html
and when I restart my nagios service command.cfg deleted, I never see second times after restart following commands.
define command {
command_name notify-service-by-slack
command_line /usr/local/bin/slack_nagios.sh > /tmp/slack.log 2>&1
}

# 'notify-host-by-slack' command definition
define command {
command_name notify-host-by-slack
command_line /usr/local/bin/slack_nagios.sh > /tmp/slack.log 2>&1
}

my nagios version = 5.2.9
slack version = 2.3.1

report > notification like that;
2016-11-21 08:38:07 Sol Nexus 5K 1 Port 503316511 Bandwidth Service Problem No CRITICAL hakan.amac Custom: notify-service-by-email CRITICAL - Current BW in: 30.98Mbps Out: 83.35Mbps
2016-11-21 08:36:33 pablo Load Service Recovery No OK erol.yilmaz Custom: notify-service-by-email OK - load average: 4.67, 4.32, 4.75
2016-11-21 08:36:33 pablo Load Service Recovery No OK orkun.karaduman Custom: notify-service-by-email OK - load average: 4.67, 4.32, 4.75
2016-11-21 08:36:33 pablo Load Service Recovery No OK seckin.aktas Custom: notify-service-by-email OK - load average: 4.67, 4.32, 4.75
2016-11-21 08:36:33 pablo Load Service Recovery No OK nagiosadmin Nagios XI OK - load average: 4.67, 4.32, 4.75
2016-11-21 08:29:03 tata Memory Usage Service Recovery No OK erol.yilmaz Custom: notify-service-by-email OK - 930 / 8058 MB (11%) Free Memory, Used: 7656 MB, Shared: 18 MB, Buffers: 2489 MB, Cached: 528 MB
2016-11-21 08:29:03 tata Memory Usage Service Recovery No OK orkun.karaduman Custom: notify-service-by-email OK - 930 / 8058 MB (11%) Free Memory, Used: 7656 MB, Shared: 18 MB, Buffers: 2489 MB, Cached: 528 MB
2016-11-21 08:29:03 tata Memory Usage Service Recovery No OK seckin.aktas Custom: notify-service-by-email OK - 930 / 8058 MB (11%) Free Memory, Used: 7656 MB, Shared: 18 MB, Buffers: 2489 MB, Cached: 528 MB
2016-11-21 08:29:03 tata Memory Usage Service Recovery No OK nagiosadmin Nagios XI OK - 930 / 8058 MB (11%) Free Memory, Used: 7656 MB, Shared: 18 MB, Buffers: 2489 MB, Cached: 528 MB
2016-11-21 08:26:36 pablo Load Service Problem No WARNING erol.yilmaz Custom: notify-service-by-email WARNING - load average: 7.46, 6.18, 5.41

and following 159 pages more

Re: Slack Integration

Posted: Mon Nov 21, 2016 10:37 am
by dwhitfield
5.3.2 has a bunch of notification bugfixes. That said, 5.3.3 should be released this week. How do you feel about an upgrade?

I will note that we are out of the office on Thursday and Friday this week, so you may want to wait until next Monday to do the upgrade. It's totally up to you in that regard. I just want you to have all the information.