An example of how to configure ChangeDetector to monitor a directory in unix

Document ID : KB000056590
Last Modified Date : 14/02/2018
Show Technical Document Details

Case Scenario:  

C
onfigure ChangeDetector to monitor /startup_scripts/tomcat60_agent823/wily/myFilesDir

 

 

Step 1: In the IntroscopeAgent.profile set the settings as follow:

 

introscope.changeDetector.rootDir=/startup_scripts/tomcat60_agent823/wily/change_detector

introscope.changeDetector.profile=/startup_scripts/tomcat60_agent823/wily/ChangeDetector-config.xml

introscope.changeDetector.agentID=SampleApplicationName

 

NOTE: For Agent 9.1 and higher versions, ChangeDetector-config.xml is available from the wily/common directory

 

Step 2: In the ChangeDetector-config.xml configure the directory to scan:

<datasource-instance name="myFilesMonitor" type="file" version="8.0">

        <property name="filesPerIteration" value="5" />

        <property name="delayBetweenIterations" value="3" unit="sec"/>

        <property name="explodeArchiveFiles" value="false" />

        <property name="maxFileSizeToUpload" value="50" unit="B"/>

        <property name="useDigest" value="needed" />

        <fileset name="myFileset" >

        </fileset>

 .....

        <scan-directory recursive="true" name="/startup_scripts/tomcat60_agent823/wily/myFilesDir" fileset="myFileset" enabled="true" >

        </scan-directory>

</datasource-instance>

 

Step 3:  Add libcdnativefile*.so to LD_LIBRARY_PATH to be able to collect the file owner since Java doesn't provide any API to collect this information:

 

For pre-91 agents:

export LD_LIBRARY_PATH=<AGENT_HOME>


In this example 

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/startup_scripts/tomcat60_agent823/wily

 

For 9.1 and higher versions:

export LD_LIBRARY_PATH=<AGENT_HOME>/common

 

 

Step 4: Go to “/startup_scripts/tomcat60_agent823/wily/myFilesDir” , create some files and update them, then confirm the changes in the Workstation.

 

 0.jpg