@channel mention popup in slack channel #nagios not working.
Posted: Mon Dec 26, 2016 1:04 pm
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
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