My subject line is probably not really that good at describing what I want advice on but here it is:
I've setup one linux box as a logsrv running rsyslog and several other linux boxes sending syslog info. I want to set the server rsyslog.conf so that in addition to normal logging to /var/log/whateverlogs it also writes everything to a fifo. Then tap into the fifo with a perl script that is written to be able to sort and write the syslog output according to various regex that may be read in at startup or later during the running script. I think I can manage the sorting/writing and maybe reading regex into the running process. (Just by an awkward funky method of having the script reread a file on disk every 5 minutes, and put what ever regex become necessary there). There are probably cleaner better ways... and I may be back asking about that but right now, where I have no real idea is how to attach the perl script to a service like the system logger. I mean so the script starts and stops with system logger and somehow alerts the system logger (and sysadmin) if it (the script) for some reason is killed or dies on its own while the system logger is still running. I imagine getting the perl script to start with the logger daemon on boot up would be simple enough by inserting something into the init script that starts the logger. >From there I'm just drawing blanks as to how a script would know if the system logger stopped, and further some kind of `trap' that would send out info to be logged by the logger and to the system admin if the script itself died or was killed. I'm slightly familiar with shell script traps but haven't encountered or had need of such in a perl script. But really I suspect I'm going at this wrong right from the start and there is a better plan to be had. I'm hoping someone with that kind of experience can outline how this might be done. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/