1

My users keep unplugging our meeting rooms computers network connection.

As i can't check the computers every time a meeting ends, i'd like to find a tool, preferably running on windows, that can monitor some cisco switch ports state, and every time a cable is being unplugged, send me an email.

I know that some monitoring solutions can do that already, but i wonder if something simplier (and preferably cheap / free of course !) exists.

1

Not exactly state of the art but written mostly as a proof of concept, the following could be used to detect when a host goes down. Add it in a regular cronjob, modify it so it emails you everytime something is down and voila! Cheap n' quick solution.

#!/usr/bin/env perl

%hosts = ( 
    'host1' => '192.168.1.1', 
    'host2' => '192.168.1.254',
);

while (($hostname, $ip) = each(%hosts)) {
    system('ping -c1 ' . $ip. ' 2>&1 > /dev/null');
    if ( $? != 0 ) {
        print "host: ".$hostname." down\n";
    } else {
        print "host: ".$hostname." up\n";
    }
}
2
  • On the cisco switch you can set up snmp, or have it log somewhere else and monitor those logs. None of that is that hard, but ping is far more simple to get the job done, so I recommend that. – Kyle Brandt Mar 12 '10 at 12:46
  • Thanks Fim, THAT is cheap :D But i can't run perl on our servers so... :s As for snmp, ping is indeed simplier to use, i'll probably build a vbscript that does the same thing as the one fim provided – Florent Courtay Mar 12 '10 at 14:28
0

I don't know about monitoring the state of a switch port, but you can certainly monitor ICMP echo response of the device connected to the port.

There are lots of free/open source monitoring solutions available that will do this, my personal favourite is Nagios.

Whilst you're at it, you might as well get Nagios monitoring your servers and other network devices too!

Edit: Sorry, Nagios actually runs on Linux, but this wikipedia page will help you find a monitoring system that runs on Windows.

0

Net::SNMP module for perl can do that. Take a look at Perl for system administrators(linked chapter handles SNMP) for some practical examples. Be sure to check out the module itself at cpan.

1
  • Can't use perl, and to be honnest I don't know perl either...That's why I was looking for a "pre-build" software solution. – Florent Courtay Mar 12 '10 at 14:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.