Enabling system monitoring

The propertyManager set command is used to enable system monitoring. You can configure what warning types are monitored, and set the size of the cache used to store the warnings.

Before you begin

IBM® Health Center must be running to enable system warnings.

About this task

You must add IBM Health Center to the jvm.options file of each runtime server in your topology. A development server (cisDev) can also run IBM Health Center. IBM Health Center is a prerequisite for capturing system warnings.

Set the global warningEnabled property to true to start the system monitoring. System monitoring captures specific messages that are logged by eXtreme Scale or the runtime server when it detects out of the ordinary activities during event processing. For example, a runtime warning message is logged when event processing takes too long, or when an agent timeouts. A system warning message is logged when the heap size is running low, or the garbage collection count hits its threshold.

Note: The warnings are kept in memory; not persisted on server restart.

Procedure

  1. Add IBM Health Center to the jvm.options file of your cisDev server or each runtime server in your topology.
    -Xhealthcenter:level=inprocess
  2. Enable the global warning property in all of these servers by running the following command:
    propertyManager set warningEnabled=true
    Check the messages.log file and look for the following message: CWMBD0224I: System monitor logging service is enabled.
    Note: System properties are persisted after a system restart.
  3. Optional: Enable system warning messages and runtime warning messages:
    propertyManager set warningSystemWarningEnabled=true 
    propertyManager set warningRuntimeWarningEnabled=true 
    Check the messages.log files and look for the following messages:
    CWMBD0218I: systemWarning is enabled.
    CWMBD0218I: runtimeWarning is enabled.
    CWMBD0220I: The Health Center is connected and ready to listen to events.
    CWMBD0240I: The Health Center is set to event only mode.
  4. Optional: Edit the default values for each runtime warning property by running the propertyManger set command. The following example shows the command to set the maximum number of runtime warnings the cache can store to 1200.
    propertyManager set warningRuntimeWarningMaxSize=1200

Results

You get the following warning information in each log entry (LogEntry) in the messages.log file: message, timestamp, warning type (system or runtime), and warning level (warning, error).

The following examples show the LogEntry for the system warning type:
LogEntry [type=systemWarning, time=1461636846077,localizedMessage=CWMBD0212W: Heap usage is running high at 90%., solutionVersion=null,level=WARNING]
LogEntry [type=systemWarning, time=1461810776931,localizedMessage=CWMBD0208W: Garbage collection frequency hit 120 times  during the last 58,062ms., solutionVersion=null, level=WARNING]
The following examples show the LogEntry for the runtime warning type:
LogEntry [type=runtimeWarning, time=1461852102515,localizedMessage=CWOBJ0061W: The transaction with TxID,Local-812A0154-5D23-A8FD-0000-00505691418D, that was last running on  thread, 0264
<GetNextInput-Rolling-IA-PARTITION-7-0>, on shard  DefaultDomain:com.ibm.ia:iaMaps:7 has exceeded the configured transaction timeout value and was been marked rollback-only. This might be caused by lock contention 
or application deadlock, or your  transaction timeout value is set too small., solutionVersion=null,  level=WARNING]
LogEntry [type=runtimeWarning, time=1461852132514,localizedMessage=CWMBD0205W: The warning message containing id  CWOBJ0061W will be suppressed temporarily. 
It has occurred 20 times in  the last 600,000 ms., solutionVersion=null,level=WARNING]
LogEntry [type=runtimeWarning, time=1461625972119,localizedMessage=CWMBD0211W: Possible database slow down where the  transaction takes 11,363ms to complete. 
SELECT EVENT, VERSION FROM  EVENTSTORE WHERE MAPNAME = ? AND EVENTID = ? AND ENTITYID = ? AND  ENTITYTYPE = ?, 4, solutionVersion=null, level=WARNING]

What to do next

Use the SystemMonitorMXBean API to retrieve the warning messages captured for each runtime server. For more information, see SystemMonitorMXBean.