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
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
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.
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
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.