The stupid question is the question not asked | |
PerlMonks |
External monitoring of a Perl programby fx (Pilgrim) |
on Sep 18, 2001 at 02:47 UTC ( [id://112995]=perlquestion: print w/replies, xml ) | Need Help?? |
fx has asked for the wisdom of the Perl Monks concerning the following question: Hello, I have a few little perl programs which watch system logfiles (eg. /var/log/maillog) and log certain things into a database. However, these little programs have been known to just suddenly die in the past. My company is becoming more reliant on these programs (they were initially simple testing tools) and want to monitor them so that they can be restarted if they die. However, they wish to control this from their 'network monitor' machine. The 'network monitor' sits on a machine and watches various services running on various servers using TCP, UDP or ICMP tests. I have been given the challenge to get my programs to work with this setup. My current suggestion is to fork/thread/whatever a little TCP or UDP client from my programs which would then respond to the monitoring machine's requests. In people's opinions, how good is this solution? I suppose my other approach would be to ignore that the 'network monitor' exists and run my own monitoring script which would restart the programs should they die. One way to do this would be to simply watch the output of 'ps', but I'm after a more Perl-based solution. Comments? fx
Back to
Seekers of Perl Wisdom
|
|