Windows Directory Monitor

Windows Directory Monitor works with .NET Agent Extension Manager to monitor changes for given folders.


Windows Directory Monitor require following files to be placed in a new folder under [ExtensionManager Root Directory]/Extensions
  • extension.xml
  • WindowsDirectoryWatcher.dll


  • .NET Agent Extension Manager, can be downloaded from here
  • The AppDynamics .NET Agent
  • .NET 4.0 or later


  • Download and extract it to any location.
  • Create a new directory under [ExtensionManager Root Directory]/Extensions. We can name the directory as DirectoryMonitor, this will be the name of extension.
  • Copy extension.xml and WindowsDirectoryWatcher.dll files to [ExtensionManager Root Directory]/Extensions/DirectoryMonitor

Getting Started

  1. Open extension.xml file copied under [ExtensionManager Root Directory]/Extensions/DirectoryMonitor in any editor and make following changes.
    • Change the name of extension, if required. (It will take the folder name if we leave it blank or remove the attribute.)
      <extension type="Metric" name="DirectoryWatcher" enabled="true">
    • Following metrics will be reported for every directory provided. We can remove any metric if it is not needed but we can not change the metric name here.
         <metric name="FileCount" description="Number of files" />
         <metric name="DirectoryCount" description="Number of directories" />
         <metric name="LastAccessTime" description="Last time the dir is accessed." />
         <metric name="LastWriteTime" description="Last time the dir is written into." />
      NOTE: LastAccessTime and LastWriteTime are captured using windows api as date-time metric. These metric are in format of MMDDhhmm. For example, 2016July21 11:24 will be reported as 7211124
    • Specify any number of directories as instances to be monitored:
          <instance name="MyFolder" data="C:\MyFolder" />
  1. Save the file and launch Extension Manager UI. We should be able to see DirectoryMonitor extension listed under "List of extensions loaded"
  1. Stop and Start Extension Service
    • it will modify .NET agent's configuration file (config.xml) to include new metrics. By default config.xml is located at %ProgramData%\AppDynamics\DotNetAgent\Config.
  1. Stop and Start AppDynamics.Agent.Coordinator Service for the metrics to be reported to controller.
    • We can click on Apply Changes or do it manually. After few minutes we should start getting metric values in metric browser under Application Infrastructure Performance|TierName|Custom Metrics|Performance Monitor|DirectoryMonitor
    • We can create custom dashboard from these metrics or create a health rule with alert, if needed.


If you're not seeing metrics, please verify following,

  • - Make sure that the AppDynamics.Agent.Coordinator service is restarted.
  • - Check the log file extensionLog.txt under Logs folder if the values are captured correctly or if there are any errors.


  1. Upgrade to latest version of extension manager
  2. Copy new extension.xml with DLL and make appropriate changes
  3. Start Extension Service to use latest version.