Well it does look simple, but it's not.
A few issues you will run into:
    * in most cases the logfile changes names every ... (this could be a new file per hour/day/week/month or each time the application/service that generates the file (re)starts), so your script needs to be able to cope with that
 
    * since the logfile will "run" longer then once cycle of Servers Alive you need to be able to keep track of until what "line" you already read the file.  And what to do if between cycle a and cycle a+1 of Servers Alive the name of the file changed?  You need to check the previousfile and the current file then.
 
    * what to do with a (re)start of the application/service?  Does this "reset" the errors?
 
    * any phrase that will reset an error?
 
    * what about authentication (aspecialy needed when the logfile is not on the same system as Servers Alive and when you're running Servers Alive as service)
 
 
 
Those are just the first "small" issues I can think off....
 
To be honest we did a custom dev. job for a UK company running Servers Alive and we had to make a generic logchecker, and I can asure you that it was not something simple to make...due to the reasons explained above (and probably we had more issues I can't directly think of).
 
 

dirk.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Jason Passow
Sent: Mon Aug 18 7:44 PM
To: [EMAIL PROTECTED]
Subject: [SA-list] Text file

 

I would like to have a check that analyzes a text file for specific info.   For example test.txt should not contain “error”.  This would be useful for analyzing a multitude of log files from other programs.  I would assume it would be relatively easy to add.   I know that it would probably possible to script my own but I think that this would be beneficial to many others.  If anyone has script written that is doing this I would appreciate some direction in scripting this.

 

Jason Passow

Mississippi Welders Supply

www.mwsco.com

[EMAIL PROTECTED]

Phone:  (507) 454-5231

Fax:  (507) 454-8104

 

Reply via email to