Hi Thinkers,
On AIX 5.3, we have a monitor program that reads the log file and searching for a certain string pattern that we define(say "transactionException"), if it sees it then it will raise an alert by sending an email.
Because the log file XXX.log is rolling into XXX.log.0, XXX.log.1, XXX.log.n...etc when a certain condition(size, time/date) meets, now my question is, is that possible that when the application generates the string "transactionException" and then it got rolled/renamed into XXX.log.0 before the monitor program sees it ? The monitor program is configured to monitor XXX.log file only ?
I am not sure how the monitor program is coded so I'd like to ask this way, if you are developing such monitor tooling, what you'd think to avoid the senario that I described above? I believe this may be to do with how Unix handle file deep down at the very low level ...
Your knowledge on this is much appreciated.
Thanks a ton.
Thegunman