Skip to content

bawuenet/eggdrop_nagios

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

eggdrop_nagios

Eggdrop script adding a .nagios command for sending notifications to an IRC channel

Eggdrop configuration

Copy the nagios.tcl script into the eggdrop scriptdir and configure the bot to load the script. Additionally, a listen port needs to be opened for the nagios server to be able to telnet into the bot.

listen 5555 all
source scripts/nagios.tcl

Reload the bot using .rehash on the partyline.

Nagios configuration

Copy the irc_notify.expect script to a location reachable on your nagios server. Ensure the expect package is installed.

Add the notify-host-by-irc and notify-service-by-irc commands to the nagios configuration and add a new contact using these commands.

define command {
        command_name    notify-host-by-irc
        command_line    /usr/bin/expect /usr/local/share/nagios/irc_notify.expect \
                "$NOTIFICATIONTYPE$" \
                "$HOSTNAME$" \
                "Host" \
                "$HOSTSTATE$" \
                "$HOSTOUTPUT$"
}

define command {
        command_name    notify-service-by-irc
        command_line    /usr/bin/expect /usr/local/share/nagios/irc_notify.expect \
                "$NOTIFICATIONTYPE$" \
                "$HOSTNAME$" \
                "$SERVICEDESC$" \
                "$SERVICESTATE$" \
                "$SERVICEOUTPUT$"
}
define contact{
        contact_name                    irc
        alias                           #bawue-alerts IRC Channel
        host_notifications_enabled      1
        service_notifications_enabled   1
        host_notification_period        24x7
        service_notification_period     24x7
        host_notification_options       d,u,r,s,f
        service_notification_options    w,u,c,r
        host_notification_commands      notify-host-by-irc
        service_notification_commands   notify-service-by-irc
}

Reference documentation

About

Eggdrop script adding a .nagios command for sending notifications to an IRC channel

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages