check_multi advice to check "Internet available"

Matt Simmons standalone.sysadmin at gmail.com
Mon May 24 21:37:13 CEST 2010


Have you considered adding your upstream router as a host, and making
it the parent of your remote hosts?

Also, remember to take off the 'u' notification flag of the uplink's
children, otherwise you'll still be buried under a pile of
notifications.

--Matt

On Mon, May 24, 2010 at 5:37 AM, Marc Haber
<mh+nagios-users at zugschlus.de> wrote:
> Hi,
>
> I am checking a number of servers which are "on the Internet", and are
> thus likely to become unreachable for my Nagios installations in case
> of an outage out there on the Internet. I would like to have a "host"
> which I could use as parent host for all those servers so that I don't
> get buried under an avalanche of HOST DOWN alarms should my Internet
> go partly or fully down.
>
> I have investigated using check_multi do help me with that, and have
> come up with a solution which can help me with this task. I would like
> to solicit your comments to that solution.
>
> I have defined a number of hosts which are checked by Nagios proper,
> just as normal hosts are. Their individual notifications may be
> switched off, but I haven't done so since I like to see what's going
> on at least in the start phase. Their hostnames all start with
> mh-internet, so I can use a single check_multi config line to pull
> them all into a single check_multi check. check_multi is then used as
> service and host check on a "virtual host" called internet, which goes
> CRITICAL when more than one mh-internet-foo host is CRITICAL.
>
> Here is my detailed configuration:
>
> /etc/nagios3/conf.d/internet.cmd:
> statusdat [ internet ] = /^mh-internet-.*$/:my-defaultping
>
> state[WARNING] = COUNT(WARNING) > 1
> state[CRITICAL] = COUNT(CRITICAL) > 1
> state[UNKNOWN] = COUNT(UNKNOWN) > 1
>
>
> Nagios configuration:
> define host {
>        use                     mh-host
>        host_name               mh-internet
>        alias                   internet
>        address                 127.0.0.1
>        parents                 localhost
>        check_command           check_multi!-f /etc/nagios3/conf.d/internet.cmd
> }
>
> define service {
>        name                            my-internet
>        use                             my-service
>        service_description             my-internet
>        check_command                   check_multi!-f /etc/nagios3/conf.d/internet.cmd
>        host_name                       mh-internet
> }
>
> define command {
>        command_name                    check_multi
>        command_line                    /usr/lib/nagios/plugins/check_multi $ARG1$ $ARG2$ $ARG3$ $ARG4$
> }
>
> define host {
>        use                     mh-host
>        host_name               mh-internet-torres
>        hostgroups              mh, ping
>        alias                   torres.zugschlus.de
>        address                 85.214.68.41
>        parents                 mh-internet
> }
>
> define host {
>        use                     mh-host
>        host_name               mh-internet-heise
>        hostgroups              mh, ping
>        alias                   www.heise.de
>        address                 www.heise.de
>        parents                 mh-internet
> }
>
> define host {
>        use                     mh-host
>        host_name               mh-internet-google-de
>        hostgroups              mh, ping
>        alias                   www.google.de
>        address                 www.google.de
>        parents                 mh-internet
> }
>
> I am wondering whether this is a valid approach, or whether there
> are better solutions for this challenge. If somebody familiar with
> check_multi configuration, I would like to know whether there are any
> possible issues hiding in my use of check_multi. Any comments will be
> appreciated.
>
> Greetings
> Marc
>
> --
> -----------------------------------------------------------------------------
> Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
> Mannheim, Germany  |  lose things."    Winona Ryder | Fon: *49 621 72739834
> Nordisch by Nature |  How to make an American Quilt | Fax: *49 3221 2323190
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> 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
>



-- 
LITTLE GIRL: But which cookie will you eat FIRST?
COOKIE MONSTER: Me think you have misconception of cookie-eating process.

COOKIE MONSTER: Boy, I wish I were a sysadmin so I could go to the
NJ-PICC Sysadmin Conference! http://www.picconf.org

------------------------------------------------------------------------------

_______________________________________________
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