Showing results for 
Search instead for 
Did you mean: 
Create Post

Dynamic Log Parser.apm-template

I've created a template with two component. The first searches a text file for multiple strings and outputs a count. The second component does a similar thing but uses a wildcard for the filename and searches only the latest file that matches. It is intended to be used for parsing log files for specific messages, the second component to be used when the log files append time/date or a sequential number to the file name.

For the first component just enter the path as the first and only argument then edit the array to include all strings. Enter each string in quotes and separate with a comma.

For the second component enter the first part of the path as arg0 and the second part as arg1, separated with a comma then edit the array as above.

Set the count variable to alert on anything over zero.

Labels (1)

Hello, this template worked great.  I have a question though.  Will it only check new log entries every poll or will it keep checking the same logs?

Version history
Revision #:
1 of 1
Last update:
‎01-24-2020 03:56 PM
Updated by: