@channel mention popup in slack channel #nagios not working.

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
kaushalshriyan
Posts: 119
Joined: Fri May 22, 2015 7:12 am

@channel mention popup in slack channel #nagios not working.

Post by kaushalshriyan »

Hi,

I am using the slack_nagios.pl perl script. I have integrated it with Nagios 4.2.0 to send notifications to Slack. Is there a way to setup @channel in https://raw.githubusercontent.com/tinys ... /nagios.pl perl script so that if there are any alert notifications it will pop up in the slack channel.

Settings in commands.cfg for sending alerts to slack are as below.

#'notify-service-by-slack' command definition
define command {
command_name notify-service-by-slack
command_line /usr/local/bin/slack_nagios.pl -field slack_channel=#nagios -field HOSTALIAS="$HOSTNAME$" -field SERVICEDESC="$SERVICEDESC$" -field SERVICESTATE="$SERVICESTATE$" -field SERVICEOUTPUT="$SERVICEOUTPUT$" -field NOTIFICATIONTYPE="$NOTIFICATIONTYPE$"
}

#'notify-host-by-slack' command definition
define command {
command_name notify-host-by-slack
command_line /usr/local/bin/slack_nagios.pl -field slack_channel=#nagios -field HOSTALIAS="$HOSTNAME$" -field HOSTSTATE="$HOSTSTATE$" -field HOSTOUTPUT="$HOSTOUTPUT$" -field NOTIFICATIONTYPE="$NOTIFICATIONTYPE$"

Any help will be highly appreciable. Please let me know if you need any additional information.

Regards,

Kaushal
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: @channel mention popup in slack channel #nagios not work

Post by dwhitfield »

That script was written by someone or an organization called Tiny Speck. It's probably best to reach out to them for support for the script.

That said, we can leave this open for community feedback.
kaushalshriyan
Posts: 119
Joined: Fri May 22, 2015 7:12 am

Re: @channel mention popup in slack channel #nagios not work

Post by kaushalshriyan »

Thanks dwhitfield for the reply.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: @channel mention popup in slack channel #nagios not work

Post by rkennedy »

I would take a look at the official slack integration to do this. https://slack.com/apps/A0F81R747-nagios
Former Nagios Employee
Locked