I have a script written to monitor logs and send out an SMTP mail message to
me.
Problem is - If a server has a problem on the SAME event (i.e. Symantec
Errors) I only want it to send me the message 1 time
Here is what I have thought of to fix it:
Every time an event occurs - it appends to a txt file the event id code.
Everytime it finds an error - it first checks that file to see if that event
id is in there. if it is, it skips it.
I will delete this file 1 time a day with another script to stop it from
running.
My question:
How do I code it to append something to a txt file - I know that is an easy
one
Next, how do I check it, or read it to say if its found, then skip it. else
send out the mail
Thanks in advance