Customizing data collector with properties files

By default, transaction tracking and method tracing are enabled for the data collector. Heap snapshot collection and memory allocation collection are disabled. You can customize the data collection or the intervals at which the diagnostic data is collected by editing the .properties files of the data collector.

About this task

The properties files of the data collector are in the dc_home directory, for example, /opt/liberty855/wlp/usr/servers/defaultServer/.gdc/7.3.0.14.08. Use different properties to customize the data collector for the following purposes:

  • Enable or disable transaction tracking.
  • Enable or disable heap snapshot collection.
  • Specify the interval at which the data collector takes snapshot of heap dump.
  • Enable or disable memory allocation monitoring.
  • Specify the interval at which the data collector collects memory allocation information.
  • Enable or disable method tracing.
Remember: After you modify the .properties files, use the cf push command to push the updates to the IBM® Cloud environment.

Procedure

  • To enable or disable transaction tracking, set the com.ibm.tivoli.itcam.dc.bluemix.transaction.enabled property in the following file to true or false:

    dc_home/ldc/etc/ldc.properties

    If transaction tracking is enabled, you can monitor IBM Java application stack in the topologies.
  • To enable or disable heap snapshot collection, set the com.ibm.tivoli.itcam.hc.send.heap.enable and com.ibm.tivoli.itcam.hc.snapshot.automatic.enable properties in the following file to true or false.

    dc_home/healthcenter/etc/hc.properties

    If heap snapshot collection is enabled, the data collector can take heap snapshot at specified intervals. Heap dump information can be displayed in the Heap Dump dashboard.
  • To change the interval at which heap snapshot is taken by the data collector, set the com.ibm.tivoli.itcam.hc.snapshot.automatic.interval property in the same file to a positive integer. The unit of the interval is minute and the default is 360.

    dc_home/healthcenter/etc/hc.properties

  • To enable or disable memory allocation collection, set the com.ibm.tivoli.itcam.hc.events.collection.automatic.enable property in the following file to true or false.

    dc_home/healthcenter/etc/hc.properties

    Remember: To enable memory allocation collection, you also need to ensure the following two lines are added to the jvm.options file of the Liberty server.
    -Xhealthcenter:level=inprocess
    -Xgc:allocationSamplingGranularity=10000
    After memory allocation collection is enabled, data is available in the Memory Analysis dashboard.
  • To specify the interval at which memory allocation information is collected, set the com.ibm.tivoli.itcam.hc.events.collection.automatic.interval property in the same file to a positive integer. The unit of the interval is minute and the default is 15.

    dc_home/healthcenter/etc/hc.properties

  • To enable or disable method tracing, set the dfe.enable.methoddata property in the following file to true or false:

    dc_home/gdc/etc/gdc_dfe.properties

What to do next

  • After method tracing is enabled, you can set thresholds for different types of requests by using the environment variables, so that different levels of monitoring data can be collected for different requests. For applicable environment variables, see Table 3.
  • If you disabled memory allocation collection, remember to remove the following lines from the jvm.options file of the Liberty server:
    -Xhealthcenter:level=inprocess
    -Xgc:allocationSamplingGranularity=10000