An open API service indexing awesome lists of open source software.

https://github.com/mortimus/nagiosslacknotifier

Allows nagios to send notifications via slack or Microsoft Teams. This needs some heavy refactoring to clean things up, but this works for the task needed. Was built for a dual company setup for notifications to a single slack channel.
https://github.com/mortimus/nagiosslacknotifier

golang nagios slack

Last synced: about 1 month ago
JSON representation

Allows nagios to send notifications via slack or Microsoft Teams. This needs some heavy refactoring to clean things up, but this works for the task needed. Was built for a dual company setup for notifications to a single slack channel.

Awesome Lists containing this project

README

          

Add to misccommands.cfg

define command {
command_name host-notify-by-slack
command_line /usr/bin/slackNagiosBot "HOST" "COMPANY" "#testing" '$NOTIFICATIONTYPE$' '$SERVICEDESC$' '$HOSTALIAS$' '$HOSTADDRESS$' '$SERVICESTATE$' '$LONGDATETIME$' '$HOSTOUTPUT$' '$NOTIFICATIONCOMMENTS$'
}

define command {
command_name service-notify-by-slack
command_line /usr/bin/slackNagiosBot "SERVICE" "COMPANY" "#testing" '$NOTIFICATIONTYPE$' '$SERVICEDESC$' '$HOSTALIAS$' '$HOSTADDRESS$' '$SERVICESTATE$' '$LONGDATETIME$' '$SERVICEOUTPUT$'
}

then a contact is just needed for slack and notification commands are host-notify-by-slack for hosts and service-notify-by-slack for services, and binary added to /usr/bin/slackNagiosBot and chmod +x

move the config file to /opt/NagiosBot/config.json
make sure the log file in the config is writable by the nagios user