BAC 7.5 / 8.0 – how to setup a Performance KPI for a Sitescope Measurement

Business Availability Center (BAC) 7.5x / 8.0x with SiteScope 9.x / 10.x integrated

How to setup a Performance KPI for a Sitescope Measurement

Customer has integrated alerts from BAC to Operations Manager 7.5 by using the Event Based Alert functionality and sending Alert messages to the Windows Application Log and picking them up via the OV Agent monitoring the Windows log files. So far so good – this works fine – at least for BPM measurements.

There are a number of Sitescope monitors being used to measure specific URL’s as well as monitors for scripted probes. Customer would like to generate alerts from these monitors via BAC so that they can forward alarms to Operations Manager in the same way they do for the BPM alerts.
Event Based alerts cannot be used as these are reserved for BPM’s only.
Customer therefore looked at using CI Status Alerts for our Sitescope monitors, but run into the problem that there is only a System KPI defined for Sitescope monitors.
In earlier versions of BAC, the Source Adapter for Sitescope was capable of accepting all of the underlying Sitescope measurements into BAC (as CI’s), but that this has been dropped in version 8.x.

So, the question is then – how to setup a Performance KPI (based on a performance monitor/measurement that has been set up in Sitescope) – and for that matter an Availability KPI for a Sitescope Monitor/Measurement in BAC, so that CI Status Alerts can be generated for them and forward the alerts as alarms to my Operations Manager 7.5 installation?
The System KPI is too generic in that it only lets one know if the measurement has failed or not and does not provide information as to whether the failure is due to a response time threshold being exceeded or if the availability measurement failed.
The data for the measurement is uploaded to BAC, as one can see the numbers in the tree in the dashboard when hovering over the leaf in question – so the data is in BAC somewhere, but how to access it via a KPI so that actions can be taken on it?
Setting up a Performance KPI does not work work.

Per KM526728 BAC – How to use Sitescope Performance rule/KPI ?

The system performance rule can only be added to Siteccope measurement CIs.

They are not applicable for SiteScope monitor or group CIs.

This feature is disabled from BAC 7.0 and on. We will not allow Sitescope system measurement CI inserted into CMDB.
System performance KPI is still included for backward compatibility.

While the data is in the Profile database as well, there is no direct connection between the KPIs/CIs and the SiteScope data.

Solution
Here is how it can be done:
(there are multiple ways to setup a Performance KPI, this is the most basic and manual one, but at least it works, further down there is another method explained)

First option – all done manually

First example (CPU monitor – CPU Utilization):

on a SiteScope system, two CPU monitors against a Windows system have been, titled

CPU vm17001
CPU vm17015
running all 2 minutes

SiteScope’s data reduction feature has been disabled by modifying <SiteScope_install_dir>groupsmaster.config,

changing

_topazEnforceUseDataReduction=

to

_topazEnforceUseDataReduction=false

SiteScope and BAC have to be restarted afterwards.

With the data reduction in place (introduced to SiteScope with version 9.0 or 9.5) only changed metrics are sent to BAC, when having it disabled, the metrics are sent continously.

In BAC, using the Applications -> User Reports -> Custom Query Builder, check for the IDs of the metrics:

view : past hour

sample type: SiteScope Measurements (ss_t)

filter:
((szMonitorTitle = (‘CPU vm17015’) AND szMeasurementName = (‘utilization’))

OR

(szMonitorTitle = (‘CPU vm17001’) AND szMeasurementName = (‘utilization’)))

fields:

time_stamp u_iSessionId u_iMeasurementId Monitor Title Measurement Name Measurement Value
10/30/09 7:58 AM 7.00 400,190.00 CPU vm17001 utilization 3.00
10/30/09 7:59 AM 7.00 400,095.00 CPU vm17015 utilization 12.00

Create two CIs:

BAC -> Admin -> Universal CMDB -> Modeling -> IT Universe Manager

Create New CI
Select CI Type
Monitor -> System Monitor -> SiteScope Measurement

enter

Key Properties

Measurement ID 400190
Session ID 7

Properties inherited from class Monitor

Selector

<CompositeSelector logicalOp="OR">
<CompositeSelector logicalOp="AND">
<Selector key="sampleType" op="EQ" type="String" value="ss_monitor_t"/>
<Selector key="u_iMeasurementId" op="EQ" type="Long" value="400190"/>
<Selector key="u_iSessionId" op="EQ" type="Long" value="7"/>
</CompositeSelector>
<CompositeSelector logicalOp="AND">
<Selector key="sampleType" op="EQ" type="String" value="ss_t"/>
<Selector key="u_iMeasurementId" op="EQ" type="Long" value="400190"/>
<Selector key="u_iSessionId" op="EQ" type="Long" value="7"/>
</CompositeSelector>
</CompositeSelector>

Properties inherited from class IT Universe
Name CPU_UTIL_PCT_vm17001

and a second one

Create New CI
Select CI Type
Monitor -> System Monitor -> SiteScope Measurement

enter

Key Properties

Measurement ID 400095
Session ID 7

Properties inherited from class Monitor

Selector

<CompositeSelector logicalOp="OR">
<CompositeSelector logicalOp="AND">
<Selector key="sampleType" op="EQ" type="String" value="ss_monitor_t"/>
<Selector key="u_iMeasurementId" op="EQ" type="Long" value="400095"/>
<Selector key="u_iSessionId" op="EQ" type="Long" value="7"/>
</CompositeSelector>
<CompositeSelector logicalOp="AND">
<Selector key="sampleType" op="EQ" type="String" value="ss_t"/>
<Selector key="u_iMeasurementId" op="EQ" type="Long" value="400095"/>
<Selector key="u_iSessionId" op="EQ" type="Long" value="7"/>
</CompositeSelector>
</CompositeSelector>

Properties inherited from class IT Universe
Name CPU_UTIL_PCT_vm17015

BAC -> Admin -> Universal CMDB -> Modeling -> View Manager

create a new view SG_SiteScope_Measurements containing the two CIs

CPU_UTIL_PCT_vm17001 and CPU_UTIL_PCT_vm17015

(in this example one could simply add the group Monitor -> System Monitor -> SiteScope Measurement)

BAC -> Admin -> Dashboard -> Repositories -> KPI

clone the KPI "Performance"

modify the cloned KPI "Performance"

change

Display Label : SG_CPU_Util

Type : "VALUE_OR_STATUS"

Status : Status

Formatting Method : getIntValue

Value : NODE.DIM.RESULTS.Value

Value Postfix : %

Units : Percentage

Applicable Rules -> select "SiteScope Measurement Rule"

Applicable Sections: Dashboard

Note:

the Formatting Method getIntValue will display fractional values like 33.4 as 33.

Using

Formatting Method : resourceFromKey

would display 33.4

BAC -> Admin -> Dashboard -> KPI

select view SG_SiteScope_Measurements
click on the + button to expand it
select CPU_UTIL_PCT_vm17001

tab KPI
click Add KPI
KPI : SG_CPU_Util

Business Rule : Worst Child Rule

do the same for CPU_UTIL_PCT_vm17015

So for

CPU vm17001 we have session id = 7, measurement id = 400190
CPU vm17015 we have session id = 7, measurement id = 400095

Allow BAC some minutes to establish the values

Then:

BAC -> Applications -> Dashboard -> Console ->

select view SG_SiteScope_Measurements, tab Hierarchy

here you will see the KPIs and the values:

Second example (PING monitor – roundtriptime)

on a SiteScope system, two Ping monitors against one Windows system have been set up, titled
PING vm17001
PING vm17015
running all 2 minutes

– SiteScope’s data reduction feature disabled (see above)

In BAC, using the Applications -> User Reports -> Custom Query Builder, check for the IDs of the metrics:

view : past hour
sample type: SiteScope Measurements (ss_t)
filter:
((szMonitorTitle = (‘Ping vm17001′) AND szMeasurementName = (’round trip time’))
OR
(szMonitorTitle = (‘Ping vm17015′) AND szMeasurementName = (’round trip time’)))

fields:
time_stamp u_iSessionId u_iMeasurementId Monitor Title Measurement Name Measurement Value
11/2/09 4:12 PM 7.00 400,193.00 Ping vm17001 round trip time 0.08
11/2/09 4:13 PM 7.00 400,196.00 Ping vm17015 round trip time 0.01

So for
Ping vm17001 we have session id = 7, measurement id = 400193
Ping vm17015 we have session id = 7, measurement id = 400196

Create two CIs:
BAC -> Admin -> Universal CMDB -> Modeling -> IT Universe Manager

Create New CI
Select CI Type
Monitor -> System Monitor -> SiteScope Measurement

enter
Key Properties
Measurement ID 400193
Session ID 7

Properties inherited from class Monitor
Selector
<CompositeSelector logicalOp="OR">
<CompositeSelector logicalOp="AND">
<Selector key="sampleType" op="EQ" type="String" value="ss_monitor_t"/>
<Selector key="u_iMeasurementId" op="EQ" type="Long" value="400193"/>
<Selector key="u_iSessionId" op="EQ" type="Long" value="7"/>
</CompositeSelector>
<CompositeSelector logicalOp="AND">
<Selector key="sampleType" op="EQ" type="String" value="ss_t"/>
<Selector key="u_iMeasurementId" op="EQ" type="Long" value="400193"/>
<Selector key="u_iSessionId" op="EQ" type="Long" value="7"/>
</CompositeSelector>
</CompositeSelector>

Properties inherited from class IT Universe
Name PING_ResponseTime_vm17001

and a second one

Create New CI
Select CI Type
Monitor -> System Monitor -> SiteScope Measurement

enter
Key Properties
Measurement ID 400196
Session ID 7

Properties inherited from class Monitor
Selector
<CompositeSelector logicalOp="OR">
<CompositeSelector logicalOp="AND">
<Selector key="sampleType" op="EQ" type="String" value="ss_monitor_t"/>
<Selector key="u_iMeasurementId" op="EQ" type="Long" value="400196"/>
<Selector key="u_iSessionId" op="EQ" type="Long" value="7"/>
</CompositeSelector>
<CompositeSelector logicalOp="AND">
<Selector key="sampleType" op="EQ" type="String" value="ss_t"/>
<Selector key="u_iMeasurementId" op="EQ" type="Long" value="400196"/>
<Selector key="u_iSessionId" op="EQ" type="Long" value="7"/>
</CompositeSelector>
</CompositeSelector>

Properties inherited from class IT Universe
Name PING_ResponseTime_vm17015

BAC -> Admin -> Universal CMDB -> Modeling -> View Manager
the two CIs will show up in my old view SG_SiteScope_Measurements
PING_ResponseTime_vm17001 and PING_ResponseTime_vm17015
(as they also reside in the group Monitor -> System Monitor -> SiteScope Measurement)

BAC -> Admin -> Dashboard -> Repositories -> KPI
clone the KPI "Performance"
modify the cloned KPI "Performance"
change
Display Label : SG_Ping_ResponseTime
Type : "VALUE_OR_STATUS"
Status : Status
Formatting Method : resourceFromKey
Value : NODE.DIM.RESULTS.Value
Value Postfix : <space>sec
Units : seconds
Applicable Rules -> select "SiteScope Measurement Rule"
Applicable Sections: Dashboard

BAC -> Admin -> Dashboard -> KPI
select view SG_SiteScope_Measurements
click on the + button to expand it
select PING_ResponseTime_vm17001
tab KPI
click Add KPI
KPI : SG_Ping_ResponseTime
Business Rule : Worst Child Rule

do the same for PING_ResponseTime_vm17015

Allow BAC some minutes to establish the values

Then:
BAC -> Applications -> Dashboard -> Console ->
select view SG_SiteScope_Measurements, tab Hierarchy

here you will see the KPIs and the values:

Second option – change items already created in BAC (using the example from above, PING monitor – roundtriptime)

on a SiteScope system, two Ping monitors against one Windows system have been set up, titled
PING vm17001

PING vm17015
running all 2 minutes

– SiteScope’s data reduction feature disabled (see above)

In BAC, using the Applications -> User Reports -> Custom Query Builder, check for the IDs of the metrics:

view : past hour
sample type: SiteScope Measurements (ss_t)
filter:
((szMonitorTitle = (‘Ping vm17001′) AND szMeasurementName = (’round trip time’))
OR
(szMonitorTitle = (‘Ping vm17015′) AND szMeasurementName = (’round trip time’)))

fields:
time_stamp u_iSessionId u_iMeasurementId Monitor Title Measurement Name Measurement Value
11/2/09 4:12 PM 7.00 400,193.00 Ping vm17001 round trip time 0.08
11/2/09 4:13 PM 7.00 400,196.00 Ping vm17015 round trip time 0.01

So for
Ping vm17001 we have session id = 7, measurement id = 400193
Ping vm17015 we have session id = 7, measurement id = 400196

When looking at "Ping vm17015", BAC already created a CI for the monitor, but of type SiteScope Monitor (not SiteScope Measurement)
(BAC -> Dashboard -> Console -> View "System Monitors") with the following Selector Expression:

<CompositeSelector logicalOp="OR">
<CompositeSelector logicalOp="AND">
<Selector key="sampleType" op="EQ" type="String" value="ss_monitor_t"/>
<Selector key="u_iConnectionId" op="EQ" type="Long" value="7001080"/>
<Selector key="u_iSessionId" op="EQ" type="Long" value="7"/>
</CompositeSelector>
<CompositeSelector logicalOp="AND">
<Selector key="sampleType" op="EQ" type="String" value="ss_t"/>
<Selector key="u_iConnectionId" op="EQ" type="Long" value="7001080"/>
<Selector key="u_iSessionId" op="EQ" type="Long" value="7"/>
</CompositeSelector>
</CompositeSelector>

so there is no need to create a CI, simply modify the Selector (remobe the ss_monitor_t part):
<CompositeSelector logicalOp="AND">
<Selector key="sampleType" op="EQ" type="String" value="ss_t"/>
<Selector key="u_iConnectionId" op="EQ" type="Long" value="7001080"/>
<Selector key="u_iSessionId" op="EQ" type="Long" value="7"/>
</CompositeSelector>

This already would be sufficient in case the PING monitor returns one metric only, however it returns two, so an additional selector key is required,
otherwise the values would "toggle" between the metrics returned from the monitor ("% packets good" / "round trip time"):
<CompositeSelector logicalOp="AND">
<Selector key="sampleType" op="EQ" type="String" value="ss_t"/>
<Selector key="u_iConnectionId" op="EQ" type="Long" value="7001080"/>
<Selector key="u_iSessionId" op="EQ" type="Long" value="7"/>
<Selector key="szMeasurementName" op="EQ" type="String" value="round trip time"/>
</CompositeSelector>

Now you still need to create/clone the KPI as explained above in detail already:
BAC -> Admin -> Dashboard -> Repositories -> KPI
clone the KPI "Performance"
modify the cloned KPI "Performance"
change
Display Label : SG_Ping_ResponseTime
Type : "VALUE_OR_STATUS"
Status : Status
Formatting Method : resourceFromKey
Value : NODE.DIM.RESULTS.Value
Value Postfix : <space>sec
Units : seconds
Applicable Rules -> select "SiteScope Measurement Rule"
Applicable Sections: Dashboard

BAC -> Admin -> Dashboard -> KPI
select view SG_SiteScope_Measurements
click on the + button to expand it
select PING_ResponseTime_vm17015
tab KPI
click Add KPI
KPI : SG_Ping_ResponseTime
Business Rule : Worst Child Rule

Third option – change the way BAC creates the items automatically (using the example from above, PING monitor – roundtriptime)

Starting with SiteScope 9.5 CIs are created with the SiteScope topology scripts, and KPIs/Selectors are defined by KES (KPI Enrichment Service)
KES : Admin->Dashboard->Assignments

What KES does is listening to the addition of CIs, and according to KES condition add selector/KPI to the Cis
You can also run re-sync of KES for a selected CI condition
This is all documented in Dashboard help->Assigments

In this case (SiteScope monitors) the CIs are created with topology scripts, so in order to create selector you need to create a KES assignment for sitescope_measurement CI type ,
same as for sitescope_monitor CI type,
And you will have it all automated. Please make sure to use business rules that fit sitescope measurement CIs

BAC GUI -> Admin -> Dashboard -> KPI Assignments
Assignment Groups
mark
SiteScope – Factory – KPI assignment group for SiteScope CIs
and click Edit

In the next screen:
Assignments
mark
SiteScope Monitors
and click Edit

In Task you’ll find the XML structure for the complete work:

<task-config>
<contextmenu id="ssMonitorMenu"/>
<kpis-config>
<kpi-config type="1">
<rule type="4"/>
<trinity-selector override-ci-selector="true">
<CompositeSelector logicalOp="OR">
<CompositeSelector logicalOp="AND">
<Selector key="sampleType" op="EQ" type="String" value="ss_monitor_t"/>
<Selector key="u_iConnectionId" op="EQ"
type="Long" value="RefProp:monitor_id"/>
<Selector key="u_iSessionId" op="EQ" type="Long" value="RefProp:session_id"/>
</CompositeSelector>
<CompositeSelector logicalOp="AND">
<Selector key="sampleType" op="EQ" type="String" value="ss_t"/>
<Selector key="u_iConnectionId" op="EQ"
type="Long" value="RefProp:monitor_id"/>
<Selector key="u_iSessionId" op="EQ" type="Long" value="RefProp:session_id"/>
</CompositeSelector>
</CompositeSelector>
</trinity-selector>
</kpi-config>
</kpis-config>
</task-config>

Change this to

<task-config>
<contextmenu id="ssMonitorMenu"/>
<kpis-config>
<kpi-config type="1">
<rule type="4"/>
<trinity-selector override-ci-selector="true">
<CompositeSelector logicalOp="AND">
<Selector key="sampleType" op="EQ" type="String" value="ss_t"/>
<Selector key="u_iConnectionId" op="EQ" type="Long" value="RefProp:monitor_id"/>
<Selector key="u_iSessionId" op="EQ" type="Long" value="RefProp:session_id"/>
<Selector key="szMeasurementName" op="EQ" type="String" value="round trip time"/>
</CompositeSelector>
</trinity-selector>
</kpi-config>
</kpis-config>
</task-config>

Click Validate, the result is displayed on top of the screen, click OK if all works fine
Create a new ping monitor in SiteScope (I called it sgtest9), wait some time so that it shows up in BAC, and then check the CI Properties:

This part tells BAC to attach KPI "1" = "System" using Business Rule "4" = "SiteScope Monitor Rule"
<kpis-config>
<kpi-config type="1">
<rule type="4"/>

Now I would like it to use my KPI "SG_Ping_ResponseTime", KPI number 2000, with business rule "SiteScope Measurement Rule" = rule 3,
so I change the XML data once again:

<task-config>
<contextmenu id="ssMonitorMenu"/>
<kpis-config>
<kpi-config type="2000">
<rule type="3"/>
<trinity-selector override-ci-selector="true">
<CompositeSelector logicalOp="AND">
<Selector key="sampleType" op="EQ" type="String" value="ss_t"/>
<Selector key="u_iConnectionId" op="EQ" type="Long" value="RefProp:monitor_id"/>
<Selector key="u_iSessionId" op="EQ" type="Long" value="RefProp:session_id"/>
<Selector key="szMeasurementName" op="EQ" type="String" value="round trip time"/>
</CompositeSelector>
</trinity-selector>
</kpi-config>
</kpis-config>
</task-config>

Created a new SiteScope monitor again, "sgtest10", and all has been done automatically in BAC now:

The monitor "sgtest10" now has the KPI "SG_Ping_ResponseTime" automatically assigned, so one will get the number (the response time a.k.a. "round trip time") displayed in the dashboard.
No System KPI is assigned to it anymore.

Some thoughts / issues / warnings:

– after changing the KPI assignment rule, it applies to ALL SiteScope CIs that will be newly created

so whenever a new monitor is created in SiteScope, it will be created in BAC in exactly that very way (including szMeasurementName = "round trip trip")

– the same applies when you perfom a hard sync, so if you create 100 monitors using the default settings, and then 500 with the changed ones,

and then perform a hard-sycc, all monitors will be re-created using the current setting on the KPI assignment rule

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s