DX Infrastructure Management

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

Related Entries and Links

No Related Resource entered.