Highlighted
Absent Member.. Absent Member..
Absent Member..
374 views

BSM 9.01 + OMi: create custom KPI based on "Unresolved Events" KPI

Hi everybody,

I've tried to create a new kpi based on OMi's kpi value.

It should re-map severity:

I've created custom kpi with a "API Group and Sibling Rule" and I've assigned it to same CI (CI with OMi KPI).
I've choose Calculated Based On: "Child KPIs" (I'm not sure about it) and lower calculation order respect original KPI.


View:

Group A (worst state rule)
|
|-Node from OMi
OMi KPI
Custom KPI


Here, the rule that I've created:


public void calculateKPI(CI ci, KPI kpi) {
logger.debug("Inzio elaborazione calcolo custom rule")
// Get a list of all the KPIs for the CI.

List ciKpiList = ci.getAllKPIs();


// Go over the list of the CI's KPIs.

ciKpiList.each {KPI ciKPI ->

Status kpiStatus = ciKPI.status;

if (kpiStatus.isActive) {

kpi.setStatus(kpiStatus);

}else{
// Update inactive status if necessary.
kpi.status=Status.OK;
}

}

}


In top view, my kpi remains "Not Up to Date", where am I wrong?
Do you have any kind of suggestion?

Thank you,
best regards.

Jacopo
0 Likes
2 Replies
Highlighted
Absent Member.
Absent Member.

Re: BSM 9.01 + OMi: create custom KPI based on "Unresolved Events" KPI

Hi Jacopo

The "API Group and Sibling Rule" does not take the "calculated on" into the rules logic (actually ignores it), so you need to make a little modification in your code, to take the child CIs KPIs / same CI KPIs (depends on your logic, which is not clear here)

make sure you have the calculation order set correctly. please notice that Service Health
calculates the higher priority KPIs first, and then the lower priority KPIs. so your custom KPIs should have calculation order of "last"

if it does not help, look for errors under DPS machine, log\marble_worker_1 folder

0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: BSM 9.01 + OMi: create custom KPI based on "Unresolved Events" KPI

Solved using
.getType() method with KPI ID:

ciKPI.getType() == 10000


Regards,
Jacopo
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.