OverviewThe monitor searches a Windows or Linux log file for text or regular expression and returns if a new line was found, and the last line number to contain the regex.
The Log File Scraper stores the last result and position in the monitored file in a Oracle, PostgreSQL, or SQL Server database so that it knows the last position the time it ran so it's not reading the same lines over and over. If the log file rolls over the monitor is smart enough to see that and starts from the beginning of the file again. The tables in the database (or App Mon Performance Warehouse) can be created by running the attached scripts. The scripts will create the table LogFileMonitor and LogRecords tables on the database.
Log File Monitor for Windows and Linux 3.16.4 (for dynaTrace >= 5.5)
2013-03-12 Initial Release for Windows Log Files Only
2013-12-18 Log File Monitor for Windows and Linux
2014-10-22 Update for Windows and Linux Monitor - 3.15.5
2015-04-09 Patch for Windows and Linux Monitor - 3.15.7
2016-06-19 Update for Windows and Linux Monitor - 3.16.2
2017-03-17 Patches for windows compatibility
Line Number: The Line Number of the last known occurance of the specified search term.
New Message: Returns a 1 if a new entry was made to log file with the search term specified.
Number of Messages: The number of lines that matched the Search Term.
|OS||Dropdown for selecting either Windows or Linux|
|Connection Type||For Linux connections, determines if a local log file or a remote host is being monitored (SSH) with relation to the AppMon Collector.|
|SSH Type||For SSH connections, defines whether a password or public key is used for the SSH connection. Currently, only .pem keys are supported.|
|Linux Username||Linux Username to use.|
|Linux Password||Linux password to use|
The network path to the shared filed on the server that contains the log file.
If this is selected then the file must be specified in terms of a regex expression. If the directory contains multiple files that match the regex the newest file will be selected
The File that you wish to search. If the File Regex option is checked, then this must be a regex. If running using Windows, this file must be shared to the user running the dynaTrace Collector.
A regex of what you wish to search for within the log file. The search is completed per line. Example .*Warning.*
|Database Type||The type of database where the log file scraper entries will be stored.|
SQL Server to contain the repository of log file searches
Port to connect to on the database server. Default ports are:
The database to use for the log file repository.
Username used to connect to the SQL Database
The password for the username used to connect to the SQL database
|Additional Lines||Amount of additional lines to include in file after the log message is found|
|Skip Additional Records||If this box is checked, records included in the additional lines will be skipped for processing|
|Keep Historical Record||If this box is checked, a historical record of each log message will be added to the LogRecords database. This database can then be queried for a list of all log messages matching a specific search and the corresponding timestamps|
Import the Plugin into the dynaTrace Server. For details how to do this please refer to the dynaTrace documentation.
Feel free to contribute any changes on Github