AppDynamics Extension for Log Monitoring

Log Monitoring Extension


Use Case 

Use for monitoring log files to report:

  • the no of occurrences of each search term provided
  • filesize

Typical usage is counting how many 'Warn' and/or 'Error' are logged.


This extension only works with standalone machine agent.



  1. Download LogMonitor-<version>.zip and unzip it to <machine_agent_dir>/monitors/
  2. Edit config.yaml file in LogMonitor/conf file and provide the required configuration (see Configuration section)

  3. Restart the Machine Agent.




Note: Please avoid using tab (\t) when editing yaml files. You may want to validate the yaml file using a yaml validator.




The display name of the log file. If not specified, logName is used by default.


The directory path where the log is located.


The name of the log file, i.e. server.log. Supports wildcard character for filename that changes dynamically on rotation, e.g. server-*.log


Display name for this pattern


The strings to search, e.g. "debug", "info", "error". Supports regex if matchExactString is set to false. Note, this is case insensitive regardless.


Allowed values: true or false. Set to true if you only want to match the exact string, otherwise set to false forregexsupport and contains in string.


Allowed values: true or false. Set to true if you want the search to be case sensitive, otherwise false




 The no of threads used to process multiple logs concurrently


 The path prefix for viewing metrics in the metric browser. Default value is "Custom Metrics|LogMonitor|"


Below is an example config with multiple log files to monitor, one of which uses the dynamic filename and search string regex support.


  - displayName: "Machine Agent Log"
    logDirectory: "/Users/Muddam/AppDynamics/MachineAgent_4.1.2/logs"
    logName: "machine-agent.log"
        #displayName Should be unique across the patterns including the case.
       - displayName: "Debug In Caps"
         pattern: "DEBUG"
         matchExactString: false
         caseSensitive: true
       - displayName: "Debug"
         pattern: "Debug"
         matchExactString: false
         caseSensitive: true
       - displayName: "Info"
         pattern: "Info"
         matchExactString: false
         caseSensitive: false
       - displayName: "DynamicLog"
         pattern: "system\\w+"
         matchExactString: false
         caseSensitive: false

# Number of concurrent threads
noOfThreads: 3

#prefix used to show up metrics in AppDynamics 
metricPrefix: "Custom Metrics|LogMonitor|"


Metric Path

Application Infrastructure Performance|<Tier>|Custom Metrics|LogMonitor|<LogName>|Search String|<searchStrings displayName>|<Matched Term>


Application Infrastructure Performance|<Tier>|Custom Metrics|LogMonitor|<LogName>|File size (Bytes)


Custom Dashboard




1.0.028 May 2014Initial release
1.1.021 Nov 2014Added flag for matching exact string
1.1.124 Apr 2015Fixed filepointer path issue
2.0.05 May 2015Added support for dynamic filename, search string regex and concurrency.
Moved config to yaml
2.0.117 Dec 2015Added support for case sensitive search
2.0.33 Aug 2017Added seed values for patterns which aren't found
2.0.520 Sep 2017Processing of files based on creation time stamps, multi threaded processing and other enhancements
2.0.713 Feb 2018Updated Licenses



Always feel free to fork and contribute any changes directly here on GitHub



For any questions or feature request, please contact AppDynamics Center of Excellence.