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
@channel mention popup in slack channel #nagios not working.
-
- Posts: 119
- Joined: Fri May 22, 2015 7:12 am
-
- 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
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.
That said, we can leave this open for community feedback.
-
- Posts: 119
- Joined: Fri May 22, 2015 7:12 am
Re: @channel mention popup in slack channel #nagios not work
Thanks dwhitfield for the reply.
Re: @channel mention popup in slack channel #nagios not work
I would take a look at the official slack integration to do this. https://slack.com/apps/A0F81R747-nagios
Former Nagios Employee