Do you have the ability to use loopback addresses on these devices? If so, that
would be used as the host address, and then you could use other checks for the
interfaces. For instance, all of my Cisco routers have a loopback setup. I then
use 'check_ifstatus' to check the individual interfaces.
Thanks,
Garry
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Israel Brewster
Sent: Monday, March 17, 2008 12:41 PM
To: Nagios Users Mailinglist
Subject: Re: [Nagios-users] Dual-port monitoring
On Mar 17, 2008, at 9:03 AM, Gary Every wrote:
In your services file:
define service {
use generic-service
name Ping
host_name multi_homed_server_name
service_description Ping Second IFace
check_command check_ping2!10.1.1.100!3000,10%!10000,20%
contact_groups Unix
}
for your checkcommands:
define command{
command_name check_ping2
command_line /usr/lib/nagios/plugins/check_ping -H $ARG1$ -w $ARG2$
-c $ARG3$ -p 5
}
check_ping2 adds the first ARG as the ip address that you want monitored - This
means that the HOSTNAME will remain the same, but a diff interface will be
checked.
Thanks for the response. If I understand your reply correctly, though, this
just adds a second service for the host, with a separate IP from that specified
in the host directive. it does not, however, allow me to monitor the HOST on
two separate IP's, taking into account that if either interface is up, the host
is up. Perhaps my question wasn't quite clear enough. Take, for example, the
following situation:
host a has two network interfaces: a primary with an IP of 10.1.1.100 and a
secondary with an IP of 10.1.1.101.
Host a can be reached through either interface.
Host a has its host address defined as the primary of 10.1.1.100, with a check
command of check_ping
Host a also has a service defined as above, checking the secondary interface
(10.1.1.101)
If the secondary interface goes down, then everything is fine: nagios notices
that the service for the secondary interface is critical, checks the host on
the primary, sees that as being fine, and sends an alert about the service
(secondary port), while leaving the host in an OK state. This is exactly as it
should be.
However, now imagine that the primary interface goes down instead. Nagios
attempts to check the host on the primary interface, which also fails (sicne
the interface is down), and therefore nagios alerts that the host is down, and
any devices behind it are unreachable. This, however, is incorrect-since the
secondary interface is still connected and fully functional, the host and
everything behind it is still up and reachable. What I want is a situation
where Nagios will send me an alert if either interface of a host is down, but
only consider the host to be down if BOTH interfaces on the host are down. As I
explained in my original posting, I have considered a couple of options that
may accomplish this, but neither seems as elegant as I would like. Thanks for
any thoughts!
-----------------------------------------------
Israel Brewster
Computer Support Technician
Frontier Flying Service Inc.
5245 Airport Industrial Rd
Fairbanks, AK 99709
(907) 450-7250 x293
-----------------------------------------------
On Mon, Mar 17, 2008 at 9:38 AM, Israel Brewster <[EMAIL
PROTECTED]<mailto:[EMAIL PROTECTED]>> wrote:
I have a number of devices on my network that have dual-interfaces
such that either one can go down, but the device itself, and all the
devices behind it (in the case of a router) is still up and reachable.
What is the best way to set up monitoring of such devices, considering
that as far as I can tell you can only assign one IP per host? I have
looked at check_cluster, but if that is the best method I am unsure of
the best way of implementing it. Things I have thought of:
1) Create two "dummy" hosts which are the two ports, and then a third
host with a check command of check_cluster that looks at those two
dummy hosts. This seems overly complicated, not to mention cluttering
up my configs and nagios interface with three hosts where there is
really only one.
2) Simply monitor the two ports as two separate hosts. This could
work, but again clutters things up with multiple hosts where only one
exists, and adds the requirement of multi-parenting any child devices,
which can get ugly, especially in a graphical representation of the
network.
I have read http://nagios.sourceforge.net/docs/2_0/clusters.html, but
that doesn't seem to apply, at least not directly, in that it refers
either to situations where you have redundant services on one or more
hosts (perhaps that is sort of what I want?) or to where you have
multiple redundant hosts, but not to the situation where you have one
host offering one service over two ports. The main problem with that
doc, though, is that the cluster is always a service, which wouldn't
work in my situation, as the host itself is a cluster. Any thoughts?
Thanks.
-----------------------------------------------
Israel Brewster
Computer Support Technician
Frontier Flying Service Inc.
5245 Airport Industrial Rd
Fairbanks, AK 99709
(907) 450-7250 x293
-----------------------------------------------
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Nagios-users mailing list
[email protected]<mailto:[email protected]>
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
--
Gary Every
"Pay it Forward!"
________________________________
NOTICE: This e-mail and any files transmitted with it are the property of
ARCADIS U.S., Inc. and its affiliates. All rights, including without limitation
copyright, are reserved. The proprietary information contained in this e-mail
message, and any files transmitted with it, is intended for the use of the
recipient(s) named above. If the reader of this e-mail is not the intended
recipient, you are hereby notified that you have received this e-mail in error
and that any review, distribution or copying of this e-mail or any files
transmitted with it is strictly prohibited. If you have received this e-mail in
error, please notify the sender immediately and delete the original message and
any files transmitted. The unauthorized use of this e-mail or any files
transmitted with it is prohibited and disclaimed by ARCADIS U.S., Inc. and its
affiliates.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Nagios-users mailing list
[email protected]
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