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.
- Host: GitHub
- URL: https://github.com/mortimus/nagiosslacknotifier
- Owner: Mortimus
- License: mit
- Created: 2018-12-19T20:50:34.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-04-08T17:22:03.000Z (about 6 years ago)
- Last Synced: 2025-08-17T00:02:37.637Z (10 months ago)
- Topics: golang, nagios, slack
- Language: Go
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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