上一主题: 手工配置数据库监视器属性下一主题: 定义类型为 File 的数据源实例中的元素


手工配置文件系统监视器属性

通过 CA APM ChangeDetector 文件监控系统,可以控制对需求不同且容许的 I/O 开销不同的组织中文件更改的监控。 这样,便可以平衡从发生更改到检测到更改期间的处理和 I/O 成本及时间。

注意:文件监控属性区分大小写。 例如,如果要监控的目录名为 i18n,但 scan-directory name 属性设置为 I18N,CA APM ChangeDetector 将无法找到该目录。

注意:该元素在示例 Java ChangeDetector-config.xml 文件中所示的自定义配置文件示例中已定义。 本示例提供的示例数据可能会影响(也可能不会影响)数据内容。 如果您使用的是其他版本的 CA APM ChangeDetector,请在相应的位置替换为适当的内容:

<datasource-instance name="C_Drive" type="file" version="8.0">
      <!-- datasource-instance specific XML here -->
      <property name="explodeArchiveFiles" value="true" />
      <!-- Accepted units are hour, min, sec -->
      <property name="delayBetweenIterations" value="1" unit="sec" />
      <property name="filesPerIteration" value="1" />
      <property name="delayBetweenArchiveIterations" value="10" unit="sec" />
      <property name="archiveFilesPerIteration" value="1" />
      <!-- Accepted units are bytes, KBytes, MBytes -->
      <property name="maxFileSizeToUpload" value="4" unit="KB" />
      <property name="useDigest" value="needed" />
      <fileset name="default">
         <exclude pattern="(.*)\.err" />
         <exclude pattern="(.*)\.log" />
         <exclude pattern="(.*)\.lok" />
         <exclude pattern="(.*)\.tlog" />
         <exclude pattern="(.*)\.log0(.*)" />
      </fileset>
      <fileset name="NoCode">
         <include-fileset name="default" />
         <exclude pattern="(.*)\.jar" >
             <include pattern="(.*)wily(.*)\.jar" />
         </exclude>
         <exclude pattern="(.*)\.zip" />
      </fileset>
      <!--  typically, the wily agent is installed in the "wily" directory. -->
      <scan-directory name="wily" recursive="true"
         fileset="default">
         <exclude name="data" />
      </scan-directory>
      <!--  scan the java home directory, as specified in the java.home system property -->
      <scan-directory recursive="true" fileset="default"
         name="${java.home}" enabled="false">
         <exclude name="lib/zi" />
      </scan-directory>
      <!--  directories to be scanned in a typical jboss installation -->
      <scan-directory name="." recursive="true" fileset="default"
         enabled="false">
         <exclude name="log" />
         <exclude name="tmp" />
      </scan-directory>
      <!--  test scan directory -->
      <scan-directory recursive="true" fileset="NoCode" name="."
         enabled="true" />
      <!--  directories to be scanned in a typical WebSphere 5.0ee installation -->
      <!--  basically exclude the following dirs:
         _uninst, _uninstPME, BRBeans, classes, installableApps, logs, temp, tranlog, wstemp -->
      <scan-directory recursive="true" name="." fileset="default"
         enabled="false">
         <exclude name="_uninst" />
         <exclude name="_uninstPME" />
         <exclude name="logs" />
         <exclude name="temp" />
         <exclude name="tranlog" />
         <exclude name="wstemp" />
      </scan-directory>
   </datasource-instance>