In today's world, changes occur quickly in almost all areas – but especially in IT. With the growth of the Internet and the new Internet of Things there is a proliferation of data to be managed. This is both a challenge and a change for IT companies.
Today all kind of services are available through the Internet and users demand high response time and without downtime or failure. Think of your preferred web shop where you normally buy or browse items. Failures of any Internet service means consumers may choose another one and move away. There is a high risk that these consumers will never come back. This is why providing a high quality of service is vital. The key to providing these services is pro-active monitoring.
In addition, changes in the new world of IT happen fast. As a result, IT environments need to be very flexible. Demands from consumers are high and changes need to be reflected in the service offering. This shift also has an impact to service monitoring.
Fortunately Operations Manager i 10 (OMi 10) can help. OMi10 provides lots of functionality out-of the box (like Content Packs for 100+ areas), but has also the ability to get highly customized. It is the tool of choice for your monitoring needs—and it is all available in a single pane of glass. It handles all of the monitoring – either directly or via smart integration of the corresponding element manager, too! It can do both standard and advanced monitoring and is highly customizable as well.
Our customers like that the new version of Operations Manager i 10 offers great flexibility and supports all the work which needs to be done. This ability helps to successfully operate an IT monitoring environment and contributes to the success of the IT Business.
One good example for customization is the OMi event pipeline. It is highly customizable and events can be adapted at several stages. This feature is called the Event Processing Customizations - also known as Event Processing Interface (EPI).
With the EPI, incoming events can be easily modified and enriched with information from any other source—you name it. It is useful to automatically add any attributes to the event to help in problem isolation and problem resolution and at the end will save your day and will help off-load you from manual steps.
Operations Manager i 10 (OMi) includes a Script Dev Kit which makes working with the EPI very easy. In this blog I will show you how to install, configure and work with the Script Dev Kit.
The Script Dev Kit is included in the Operations Manager i 10 installation media. Once OMi10 is installed, the Script Dev Kit can be found here: /opt/HP/BSM/opr/support/script-devkit
There you can find detailed documentation and the Script Dev Kit itself. This script is a workspace that can be used with Eclipse IDE (http://www.eclipse.org/). Eclipse IDE is a powerful open source development studio. It makes programming easy by providing several benefits like code completion and syntax highlighting. Eclipse IDE itself is not included in the OMi10 installation and can be downloaded separately together with the groovy plugin. These download locations can be found inside the Script Dev Kit documentation.
Once you have downloaded the Eclipse IDE, simply start it by running the eclipse from the binary folder. The folder location depends on where you have unzipped the Eclipse IDE.
Afterward install the groovy plugin (simply click on Help -> Install New Software). For the groovy plugin also install and select the Groovy 2.2 compiler from the Extra Groovy compilers section. Afterward Eclipse IDE needs to be restarted to complete the installation.
The next step is to advise the groovy compiler to use version 2.2 (which is the compiler version used by OMi10). This can be done in Eclipse via Windows -> Preferences -> Groovy -> Groovy compiler.
Now it is time for the OMi Script Dev Kit. As mentioned before, it is a workspace for the Eclipse IDE. Therefore the only thing we need to is to import it. In Eclipse use File -> Import, select Use Project from Existing source and point to the location where you have unzipped the Script Dev Kit. That's it!
Now you should see a workspace like this:
The Script Dev Kit contains several folders: scripts, tests, lib and scriptkit.
The most important folder is the scripts folder. This folder already contains two sample scripts which can be used within the Operations Manager i module: Event Processing Customization API:
These two scripts show the basics of how an event can be enriched.
The EpiSampleScript modifies the event title and the severity of an incoming event.
The EpiAdvancedSampleScript performs more advanced queries in order to enrich the event with the related CI information.
Both are good samples and I would recommend not modifying these scripts. Then you can refer to it at any later time. Instead, I recommend creating a new script in this folder.
Remember: In case you are using functionality which requires the usage of external libraries (like jar files) they need be copied into the lib folder, too. This is important to make the Eclipse IDE recognize the new library functionality.
Now you can start developing your own scripts and benefit from all features of the Eclipse IDE like code completion, syntax highlighting and code formatting.
Uploading scripts into Operations Manager i.
Once a script is ready to be deployed in Operations Manager i 10 - you have developed and tested it successfully - you simply can copy and paste the contents into a new script inside the EPI.
Please determine the most suitable EPI steps location inside the pipeline. A script can be executed from different OMi locations (again this shows how flexible OMi10 can be customized):
Before CI/ETI Resolution
After CI/ETI Resolution
Before Storing Events
After Storing Events
Depending on what the script is doing, put the script in the corresponding EPI pipeline step. In order to refer to the related Configuration Item (CI) for an event it should be placed After CI/ETI Resolution. In case an event needs to be enriched to help CI/ETI Resolution working simply put it at location Before Storing Events.
EPI scripts that act as an external trigger can be placed After Storing Events. Hint: In case an EPI script is just used to trigger an external source and is not modifying the event itself on can also select Read-Only in the EPI script (Tab: Advanced) which results in higher performance, because other OMi events can be processed in parallel and do not wait until processing of this OMi event is finished.
The Script Dev Kit documentation explains in more detail how to create a new script and how to upload and download it into the Operations Manager i.
Another cool thing of the Script Dev Kit is that you can also test the developed script using existing events from your Operations Manager i installation.
There is a folder tests and also includes two sample script. These scripts are responsible for doing unit test and can give you a confirmation if the developed script works and how it behaves with the existing events:
Here you can copy the corresponding unit test samples and put it into your own test case. In the sample above, I have added my own script HaraldSampleScript and also the associated test case HaraldSampleScriptTest. The unit test also includes a skeleton how to connect to the Operations Manager i using a web service for even retrieval. Just fill in the correct username and password and you are ready to go.
To run the test case simply click on it and select Run As -> Junit Test.
Hint: Event debugging is also possible (Debug As -> Junit Test).
After the test case was run Eclipse IDE shows you a detailed summary where you can verify if your script works as expected.
Finally when the script is tested and uploaded (do not forget to enable it) you should see it working for your events:
Customizing the Operations Manager i event pipeline using the Event Processing Interface (EPI) gives you a great flexibility to make most of your daily events. I am sure the Script Dev Kit will make your life much easier and will enable you to generate more powerful scripts much faster.
Interested in the Script Dev Kit? Then go for it and simply try it out your own
HP Discover Las Vegas 2015 is just around the corner, starting June 2nd. We have many announcements, sessions, demonstration booths for you to see and learn about our new exciting innovations. Please register early to avoid disappointment, our HP OpsBridge related sessions are