Unmanaged switch

Paul Weaver paul.weaver at bbc.co.uk
Mon Oct 20 11:38:04 CEST 2008


How about a new command called "fakecheck", and apply to a "dumbswitch"
host with a 127.0.0.1 address. It would take a list of machines, and
check them all. If any of them are up, then the fakecheck would return
OK, otherwise it would return an error state. 

Something like
 #!/usr/bin/perl
 my $up = 0;
 my @hosts = qw/10.1.2.3 10.1.2.4 10.1.2.5 10.1.2.6/;
 foreach $addr (@hosts) {
 	if (pingCheck($addr)) {	$up++; }
 }
 if ($up > 0) {
	print "OK: Switch must be up\n";
	exit 0;
 } else {
	print "CRITICAL: Switch may be down\n";
	exit 2;
 }

(If you're good at programming you could probably get a list of children
out of the config -- complex configs take a long time to read in using
perl though)

Another way of monitoring would be to have it powered off an SNMP
enabled MDU which can tell the current being drawn. You could then
measure that.

--
Paul Weaver	
Systems Development Engineer
News Production Facilities, BBC News
Work:	020 822 58109
Room 1244  Television Centre,
Wood Lane, London, W12 7RJ



> -----Original Message-----
> From: Mike [mailto:mike at csits.net] 
> Sent: 20 October 2008 09:48
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] Unmanaged switch
> 
> 
> Folks,
> 
> What is the best way to include an unmanaged (read: IPless) 
> switch in Nagios?  Obviously I can't monitor it directly, but 
> I'd like Nagios to be aware of it in the network heirachy so 
> that it is aware that it is a possible poit of failure.  Can 
> I just define it as a host with no IP address and make it a 
> parent/client of the devices that attach to it or is there a 
> better way to approach this?
> 
> Mike.
> 
> --------------------------------------------------------------
> -----------
> This SF.Net email is sponsored by the Moblin Your Move 
> Developer's challenge Build the coolest Linux based 
> applications with Moblin SDK & win great prizes Grand prize 
> is a trip for two to an Open Source event anywhere in the 
> world http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> 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
> 

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
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