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.
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.
- Configure your monitors as explained in the Configure Monitors chapter. In our case we are using command lines.
- 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.
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.
-
In the navigation pane of the TrueSight OM console, click Configuration and select Managed Devices.
-
Click the corresponding PATROL Agent menu and select Query PATROL Agent. The Agent Query Tool opens in a new browser window.
-
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.
- Access the Monitoring Studio Configuration panel, as explained in the Configure Monitors chapter.
- Make sure the Using Object Display Names box is not checked.
- 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
- In the Formula field, enter A+B.
Step 4 - Determine the object ID of the formula
- In the navigation pane of the TrueSight OM console, click Configuration and select Managed Devices.
- Click the corresponding PATROL Agent menu and select Query PATROL Agent. The Agent Query Tool opens in a new browser window.
- 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.
- Configure your monitor threshold using the Create Monitoring Threshold chapter.
- In the instance SID field, insert the object ID obtained during step 4 preceded by the class, in our case:
hostname@hostname:Formula:globalstatus
Related Topics
- SSH-based monitoring fails due to incompatible Java versions
- Monitoring Microsoft SQL Server with Monitoring Studio X v10.4+,using Active Directory-integrated Authentication
- How to Migrate Monitoring Studio X Policies from TrueSight to Helix Operations Management
- Monitoring Studio X - Monitoring Remote Log/Flat Files
- Integrating in TrueSight KMs that are not CMA-Compatible