Path: usenet.cise.ufl.edu!usenet.eel.ufl.edu!www.nntp.primenet.com!nntp.primenet.com!howland.erols.net!news.mathworks.com!uunet!in2.uu.net!news.structured.net!crusty.teleport.com!nntp0.teleport.com!usenet From: Stunt Pope Newsgroups: comp.lang.perl.announce,comp.lang.perl.misc Subject: Announce: software to monitor remote network services Followup-To: comp.lang.perl.misc Date: 8 Nov 1996 18:58:02 GMT Organization: Private World Communications Lines: 61 Approved: merlyn@stonehenge.com (comp.lang.perl.announce) Message-ID: <55vvrq$o5k@nadine.teleport.com> NNTP-Posting-Host: gadget.cscaper.com X-Disclaimer: The "Approved" header verifies header information for article transmission and does not imply approval of content. Xref: usenet.cise.ufl.edu comp.lang.perl.announce:51 comp.lang.perl.misc:7718 A couple of weeks ago I posted to a few newsgroups looking for software to remotely monitor network services, and fire off an email message if it found a problem. i.e. every X minutes it checks ports Y and Z on N hosts and reports any problems encountered. Thanks to everyone who got back to me, responses ranged from, "let me know if you find anything", to "there's a TCL lib that you could probably use to build one" (it's a network extension to tcl called Scotty, if interested...) What i ended up doing is taking my original perl script (basically a tweaked version of the sockets example out of the camel book) that was originally run as a cron job, and rewrote it as a daemon process. It's been running for almost a week on an offsite server where I have another shell account and so far, it's been just fine. The client who needed this has had several real failures in that time (long story as to why so many of those ) and this thingy has detected them all and done the right thing. I've called this "ptingyd" (until i can think of somehing better), in honour of my client who always referred to that "pingy thingy". How it works basically is on start up it composes a list of hosts and ports to monitor. One of these can be designated the gateway, so if it finds the gateway is down, it won't bother attempting to check the hosts behind it until it comes back up. Each item in the checklist can have it's own threshold (number of consecutive fails before an error email is sent) and it's own list of email addr's to report the error to. There is also a maximum number of messages, so it'll stop sending messages once that maximum is reached (but it'll keep counting the fails until it successfully gets through). It logs all failures, and if you send it a HUP it'll dump a table that shows the current status of all the checks. If someone planned to have this notify an email-to-pager gateway (we do) it can also deal with the difference between alphanumeric and numeric pagers (i.e. it'll just send a numeric code to the latter, but the actual text of the error msg to the former). I've packed it up into a distribution, anyone's welcome to download it, use it, and contribute with enhancements or bug reports. I am also interested in hearing how anyone who uses it makes out. It's available from: http://blammo.shmooze.net/~markjr/ptingyd/ regards, markjr -- ---------------------------------------------------------------------- ||| mark jeftovic SysAdmin || http://www.shmOOze.net/~markjr ||| ||| p r i v a t e w o r l d || http://cool.as.fuck.shmOOze.net ||| ---------------------------------------------------------------------- One-time Winner of the Useless Cat Award!! .