Running the guardian command

The guardian command can be used to reference all the property files that are in a single directory. The command uses your default Java™ logging to log the messages each time an alarm condition is triggered.

About this task

You must run the pmiManager script to start the guardian utility.

The guardian utility writes a message to the Java logger when the defined thresholds of the property files in the specified directory are reached, and in some cases nearly reached.

The information that is written to these logs can be used to monitor the health of the server topology, and to find messages specific to your solutions and events. You can aggregate these logs to monitor your solutions and give you insight into what your system is doing, and what happened.

To aggregate the logs you can choose from many open source and commercial products that excel in this area. Logstash for example, is an open source tool that helps you to collect, parse, index, and forward logs. Logstash is commonly used as part of the ELK stack, which also includes Elasticsearch (a clustered search and storage system) and Kibana (a web front end for Elasticsearch). Elasticsearch is a full-text search and analytics engine that helps you to store, search, and analyze large volumes of data in near real time.

Procedure

  1. Locate the directory where you saved the guardian property files and run the pmiManager guardian command:
    pmiManager guardian property_file_directory
    Where property_file_directory is the name of a directory that contains at least one guardian property file. For example C:\IBM\guardian.

    The command loads all the properties files in the directory that have the enabled=true property.

    Note: By default, the command is run on your default server. Use the optional propertiesFile parameter to connect to and run the command on a different host or server. In a multiple server environment, run the guardian command on each runtime server in the cluster.
    In the console, look for the following messages:
    CWMBD9493I : Guardian is active. Configuration directory is c:\IBM\guardian
    CWMBD9503I : Loaded Guardlet ‘events ‘ (enabled)
    where 'events' is the name of the properties file found in the specified directory and includes the property enabled=true.
  2. Depending on your Java logging configuration, search for any warning message on the console or in the log file.

    The default Java logging properties for the utility are in the ia/etc/pmiManager_logging.properties file. You can configure a different logging file, but the logger must include the guardian logging level: com.ibm.ia.monitor.guardian.level=INFO.

Example

The following example shows the output you can get by running the guardian command on the directory that contains the guardian files.
WARNING: {"alarm" : {
"message": "Predict DelayTimerTotal.MapUsedBytes will be 463.9 MB at 2016-03-25T15:49:58.218Z. Value is increasing at 1.38 MB/hour.",
"timestamp": "2016-03-11T15:49:58.218Z",
"level": "WARNING",
"hostname": "<host_name>",
"attribute": "DelayTimerTotal.MapUsedBytes",
"currentValue": "186078",
"currentValueDisplay": "186.1 kB",
"rateOfIncrease": "1.38",
"predictedValue": "463939657",
"predictedValueDisplay": "463.9 MB",
"predictedTimestamp": "2016-03-25T15:49:58.218Z",
"threshold": "300000000",
"thresholdDisplay": "300.0 MB"}
}