Knowledge Base

Monitoring Studio 9: Configuring the Multi-Parameter Formula Monitor in CMA to alert only when multiple conditions are met

KB1271 - Jun 03, 2020

Type: Best practice

Description: This article explains how to configure the Multi-Parameter Formula Monitor in CMA to alert only when multiple conditions are met.

Additional Keywords: Monitoring Studio, CMA

Related Topics

Introduction

The Multi-Parameter Formula Monitor allows you to extract values from other metrics collected in TrueSight and computes them with a mathematical formula. You can for example add, subtract, multiply, concatenate, or divide two values, calculate an average, perform table joins, etc. To build the mathematical formula, the class name and the parameter name as they appear in the PATROL are required. In this article, you will learn how to determine these PATROL names to later configure the Multi-Parameter Formula Monitor in CMA.

Note: This KB is only applicable to Monitoring Studio 9.

Procedure

In this example, we will setup our monitor to alert us only if both of our hosts are down. We have created some command line scripts that will return either 0 (OK) or 1 (Failed).

Step 1 – Configure the monitor and numeric extraction

First we will need to configure our monitor, along the numeric extraction in order to get our 0 or 1 value.

  1. Configure your monitors as explained in the Configure Monitors chapter. In our case we are using command lines.

inline inline

  1. Configure the numeric extraction as explained in the Numeric Extraction chapter. Since our example command returns our value in the first line, we selected 1.

inline

Step 2 – Determine the Object IDs to be used

In order to be able to use two separate command line results, we will need to find out what the object IDs are. In our case, we setup a numeric extraction, giving us the SEN_MS_NUMBER class, but depending on the monitor, the class may differ.

  1. In the navigation pane of the TrueSight OM console, click Configuration and select Managed Devices.

  2. Click the corresponding PATROL Agent menu and select Query PATROL Agent. The Agent Query Tool opens in a new browser window.

  3. In the Command box, enter the print(get("/SEN_MS_NUMBER/instances")); command and click Execute. This will give us the object IDs necessary for the next step, for example:

hostname@hostname:CommandLine:status1:Number:value1 hostname@hostname:CommandLine:status2:Number:value2

Step 3 – Configure the Multi-Parameter Formula Monitor in CMA

In order to be able to get a value that encompasses both outputs, we will use a multi-parameter formula monitor to add the results together.

  1. Access the Monitoring Studio Configuration panel, as explained in the Configure Monitors chapter.
  2. Make sure the Using Object Display Names box is not checked.
  3. In the A** and **B fields, enter the two object IDs to be entered, preceded by their class. In our example:

/SEN_MS_NUMBER/hostname@hostname:CommandLine:status1:Number:value1 /SEN_MS_NUMBER/hostname@hostname:CommandLine:status2:Number:value2

  1. In the Formula field, enter A+B.
Warning: If you are using TrueSight 10.5, leave the 'A' field blank and move the parameter paths to B and C since Parameter path 'A' is not recorded in this version of BMC TrueSight Operations Management v10.5.

inline

Step 4 – Determine the object ID of the formula

  1. In the navigation pane of the TrueSight OM console, click Configuration and select Managed Devices.
  2. Click the corresponding PATROL Agent menu and select Query PATROL Agent. The Agent Query Tool opens in a new browser window.
  3. In the Command box, enter the print(get("/SEN_MS_FORMULA/instances")); command and click Execute. This will give us the instance SID necessary for the next step, in our example:

hostname@hostname:Formula:globalstatus

Step 5 – Configure the threshold for Multi-Parameter Formula Monitor

As we configured our command line outputs to return a 0 (OK) or a 1 (Failure), we would only want to be alerted if the SUM of both outputs is equal to 2 and we would configure our thresholds accordingly.

  1. Configure your monitor threshold using the Create Monitoring Threshold chapter.
  2. In the instance SID field, insert the object ID obtained during step 4 preceded by the class, in our case:

hostname@hostname:Formula:globalstatus

inline