[c-nsp] Standalone Web Site/Web Page Monitoring Device (SNMP Capable)

Joseph Jackson JJackson at nos.com
Mon May 16 09:20:24 EDT 2005


OpenNMS does this.  www.opennms.org  it can monitor devices by ping and also
services.  

Joseph

-----Original Message-----
From: cisco-nsp-bounces at puck.nether.net
[mailto:cisco-nsp-bounces at puck.nether.net] On Behalf Of Adam Maloney
Sent: Monday, May 16, 2005 5:29 AM
To: cisco-nsp at puck.nether.net
Subject: Re: [c-nsp] Standalone Web Site/Web Page Monitoring Device (SNMP
Capable)

On Sun, 15 May 2005, William Chu wrote:

> What I am looking for is a standalone device (e.g.
> like an appliance) that can be deployed at a remote
> location to monitor specific web sites and/or web
> pages. If the monitored web site/page becomes
> unavailable the device would then generate a SNMP trap
> to a network management station to alert the
> operators.

This shouldn't be terribly difficult to write in Perl using the SNMP and 
HTTP modules from CPAN.  (Forgive my perl, this is from the hip, and it 
may suck)

open(URLS, "<urls.txt");
while (@allurls = push(chomp(<URLS>)));
close(URLS);

while (1) {
   foreach $url (@allurls) {
     http_get($url) || snmp_trap($url);
   }
   sleep 300;
}

There, now just read:
http://www.cpan.org/modules/by-module/SNMP/SNMP-4.2.0.readme
to construct the SNMP trap, and read the libwww-perl documentation on how 
to perform the HTTP GET.  Easy-peasy.
_______________________________________________
cisco-nsp mailing list  cisco-nsp at puck.nether.net
https://puck.nether.net/mailman/listinfo/cisco-nsp
archive at http://puck.nether.net/pipermail/cisco-nsp/


More information about the cisco-nsp mailing list