Go to All Forums

monitor log file

Is there a plugin or easy way to monitor a flat file on a server for specific messages while keeping track of place in file. I know there is the file content check, but that seems to check the entire file and would pull in old messages 

Like (2) Reply
Replies (4)

Hi,

For File Content Check, as soon as the check is added, the file is read from the beginning. After that, the checks are done from the last checked point in the file. After the first poll, the place in the file is tracked and only new entries are scanned in the content.

Please let us know if this helps.

 

Regards

Bhuvaneshwari

Like (0) Reply

That helps.

 

Follow-ups:

1. the Max Occurrences doesn't seem to allow 0, I want it to raise an alert on first occurrence. A value of means it has to match on 2 occurrences or more.

 

Like (0) Reply

Hi,

Setting 'Max Occurrence' to 1 will ensure that the alert is raised on first occurrence. Alert will be triggered when count is equal to or greater than the max occurrence value.

 

Regards

Bhuvaneshwari

Like (0) Reply

Just to add further info (from a support ticket) to this thread for better understanding of rotated log files:

In the file content check, the server monitoring agent stores the last byte offset that the agent checked in the last poll and this is used to start the content check in the next poll.

Site24x7 uses the file size and creation time to identify that the logs have been rotated. When it identifies that the log file has been rotated, the agent starts scanning the file from the beginning.

Nick.

 

Like (0) Reply

Was this post helpful?