Nagios 1.2 - qpage

Douglas K. Rand rand at meridian-enviro.com
Fri Nov 12 20:23:05 CET 2004


I know there's been a few other responses on this already, but I
thought I'd share our qpage configs too. Not that ours are better,
just a bit different. About the only thing we do that the others
didn't have is the use of $LASTSTATECHANGE$ in our notifications. We
have some workstations that we only get notified about if they are
broken for quite a while, and getting the $LASTSTATECHANGE$ helps us
know when the problem started.

Anyway, here's our page related configs:

define contact {
        name                            generic
        register                        0
        service_notification_period     24x7
        host_notification_period        24x7
        service_notification_options    w,c,r,u
        host_notification_options       d,r
        service_notification_commands   service-notify-by-email, service-notify-by-log
        host_notification_commands      host-notify-by-email, host-notify-by-log
}


define contact {
        name                            page-generic
        use                             generic
        register                        0
        service_notification_commands   service-notify-by-pager, service-notify-by-log
        host_notification_commands      host-notify-by-pager, host-notify-by-log
}

define contact {
        name            rand
        use             generic
        register        0
        alias           Douglas K. Rand
        email           rand at meridian-enviro.com
        pager           rand
}

define contact {
        contact_name                    page-rand
        use                             rand
        service_notification_commands   service-notify-by-pager, service-notify-by-email, service-notify-by-lo
g
        host_notification_commands      host-notify-by-pager, host-notify-by-email, host-notify-by-log
}

define contact {
        contact_name                    page-rand-critical
        use                             rand
        service_notification_options    u,c,r
        host_notification_options       d,r
        service_notification_commands   service-notify-by-pager, service-notify-by-email, service-notify-by-lo
g
        host_notification_commands      host-notify-by-pager, host-notify-by-email, host-notify-by-log
}

define contactgroup {
        contactgroup_name       page-admins
        alias                   Meridian Administrators
        members                 irc, page-rand, page-bryanh
}


# Send a notification to a pager and a copy to their email also
define command {
        command_name    service-notify-by-pager
        command_line    echo "$SERVICEDESC$ $NOTIFICATIONTYPE$ for $HOSTNAME$ is $SERVICESTATE$ at `/bin/date -r $LASTSTATECHANGE$ +%H:%M` -- $OUTPUT$" | /usr/local/bin/qpage -f nagios $CONTACTPAGER$
#       command_line    echo "$SERVICEDESC$ $NOTIFICATIONTYPE$ for $HOSTNAME$ is $SERVICESTATE$ at $TIME$ -- $OUTPUT$" | /usr/bin/mail -s "Simulated Page - $NOTIFICATIONTYPE$ alert - $HOSTNAME$/$SERVICEDESC$ is $SERVICESTA
TE$" $CONTACTPAGER$
}

define command {
        command_name    host-notify-by-pager
        command_line    echo "HOST $NOTIFICATIONTYPE$ for $HOSTNAME$ is $HOSTSTATE$ at `/bin/date -r $LASTSTATECHANGE$ '+%H:%M'` -- $OUTPUT$" | /usr/local/bin/qpage -f nagios $CONTACTPAGER$
}




-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list