07-02-2012 05:29 AM
In the BSM is possible to calculate the KPI using the grooves scripts.
Can I calculate with groovy-script, for example, the average severity of omi events related to CI, and based on the obtained value set KPI?
Which methods i need to use for call any omi event attributes?
07-02-2012 05:58 AM
In Groovy rules you can do almost anything, so the answer to your question is yes, it is possible.
Will I recommend on doing that? the answer is NO. The script you are looking for is going to query OMi REST API and it will impact your performance.
In general, KPIs are calculated only by other KPIs and/or HIs. OOTB OMi provide an HI that has the number of Unassigned and Unresolved events. I think this should be your approach.
07-02-2012 06:37 AM
Thank you for your answer, Asaf Shechter, so if you not recomended to call OMi REST API, how i can set HI based on some calculations depending on the attribute values of OMI Events Attributes?
07-02-2012 07:22 AM
the best performance way is to have a dedicated HI for your events (maybe using HI mapping rules) or Event processing interface, and have the KPI calculated only from HIs.
07-03-2012 12:31 PM
Follow what Asaf told you. here are more detailed steps:
1. add ETI hint like <<HI_NAME>>:<<HI_VALUE>> in CMA or IA
2. create HI in indicateor UI if you don't use OOB ones
3. in HI mapping rule, map that HI to CIT.
3. Create HI assignment for CIT in SH if that HI does not exist in model.
Please try it and let me know if you run into any issue.
09-12-2012 09:06 AM
I also need attribute values of OMi events, which are related to CI, for calculating KPI value.
Is it possible to directly from KPI groovy script take events attributes?
For example as well as attributes of CI by kpi.getCI() command.
Search this information in OMi REST API (OMi Extensibility), but not found.
Please give an example of script, which can get events attributes, if it possible.
09-14-2012 03:25 PM
KPI calculated on top of HIs. I don't recommend getting event's attributes for KPI calculation, but the only way to achieve this is by accessing the OMi REST API, and the OMi Extensibility Guide has many examples.