DX Infrastructure Management

 View Only

CA on CA Tech Tip - Using REST API to create alarms for integration 

Jun 14, 2018 08:54 AM

Hi Community,

At times we need to integrate alarms with UIM. You have a number of options for doing this snmp traps, logmon, nimalarm and calling the REST API. We have enhanced the UIM Python REST API library to include the creation of alarms via REST. We have also provide example code in Git Hub on how to create the alarms in the alarmme.py file. It follows the same premise as the previous examples in this series. 

  1. Gather the access information to the UIM REST API
  2. Gather the information to open the alarm (source, alarm text, suppression key, sub system id)
  3. Call create_alarm to open the alarm

The same sample configuration file format will work as in the previous examples posted. Note that you can modify the alarm severity to suit your needs and also close alarms by using the clear severity (assumes your source and suppression key match).

 

No need to fear the API. If you learn Python requests module and understand JSON you can have success. Hopefully the examples provided are helping you automate things via the API.

 

rtirak

JAllen11

 

Disclaimer: I am a CA employee. I work in the CA IT department. The code is not sanctioned by CA support or development. Test before using in production. I am not a product manager or product developer and has such cannot provide product insight beyond what is in the publicly available documentation.

Statistics
0 Favorited
5 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Comments

Jun 18, 2018 03:58 PM

Hi Robert,

 

We have never seen this drop in connection that you describe or wasp restarts. For the most part we run a lot of these everyday so our NOC would not have been happy about that. Maybe something to discuss with the support team as calls to the REST API should not do that.

 

Happy  to hear the examples are helping. That is why we decided to post them. It is intimidating to start but once you see a few examples and get the hang of it is easy to follow and create your own solutions.

 

rtirak

Jun 18, 2018 03:40 PM

Alquin

 

Something I did notice though it seems when I run some of the scripts to automate with the API its causing connection drops to the UMP/Admin Console/Infrastructure Manager. It all most seems like the WASP is recycling for some reason. Have you ever seen this before?

 

Thanks for the other examples. I was however able to write my own and will upload the example I have created. Your examples were/are a lot of help!

Jun 14, 2018 08:56 AM

A great collaboration example !

Related Entries and Links

No Related Resource entered.