When using REST API for Alarm Subscriptions is there a way to correlate alarms?

book

Article ID: 194094

calendar_today

Updated On:

Products

CA Spectrum

Issue/Introduction

We have noticed that when using REST API for Alarm Subscriptions that alarms are not being correlated.  For example when we have a Chassis Down we get 3 alarms  (Chassis Down, Device Has Stopped Responding to Polls and Blade Status Unknown), but in OneClick the alarms are correlated correctly to a Chassis Down alarm.  How can we achieve this with using REST API?

Cause

Alarms are not being correlated from REST API Alarm Subscription

Environment

Release : 10.3.x / Spectrum 10.4.x

Component : Spectrum Alarms / Spectrum OneClick

Resolution

When using REST API Subscription if you want to correlate the alarms you need to pass the subscription through a filter.

The bold part below is the filter that is needed for Alarm Correlation.

 


<?xml version="1.0" encoding="UTF-8"?>
<rs:subscription-request xmlns:rs="http://www.ca.com/spectrum/restful/schema/request" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ca.com/spectrum/restful/schema/request ../../../Rest.a/src/xsd/Request.xsd">
   <rs:pull-delivery-mode>
      <rs:max-notifications>10000</rs:max-notifications>
      <rs:pull-interval>300000</rs:pull-interval>
   </rs:pull-delivery-mode>
   <rs:alarm-request>
      <rs:sort order="descending">
         <rs:attribute id="0x11f4e" />
      </rs:sort>
      <rs:attribute-filter>
         <search-criteria xmlns="http://www.ca.com/spectrum/restful/schema/filter">
            <filtered-models>
               <and>
                  <or>
                     <and>
                        <does-not-equal>
                           <attribute id="0x1000a">
                              <value>4</value>
                           </attribute>
                        </does-not-equal>
                        <equals>
                           <attribute id="0x11f56">
                              <value>3</value>
                           </attribute>
                        </equals>
                     </and>
                     <and>
                        <does-not-equal>
                           <attribute id="0x1000a">
                              <value>4</value>
                           </attribute>
                        </does-not-equal>
                        <equals>
                           <attribute id="0x11f56">
                              <value>2</value>
                           </attribute>
                        </equals>
                     </and>
                     <and>
                        <does-not-equal>
                           <attribute id="0x1000a">
                              <value>4</value>
                           </attribute>
                        </does-not-equal>
                        <equals>
                           <attribute id="0x11f56">
                              <value>1</value>
                           </attribute>
                        </equals>
                     </and>
                  </or>
                  <equals>
                     <attribute id="0x12a07">
                        <value>0</value>
                     </attribute>
                  </equals>
               </and>
            </filtered-models>
         </search-criteria>
      </rs:attribute-filter>
      <rs:requested-attribute id="0x11f56" />
      <!-- Alarm Severity -->
      <rs:requested-attribute id="0x12b4c" />
      <!-- Alarm Title -->
      <rs:requested-attribute id="0x1006e" notify-of-changes="true" />
      <!-- Model Name -->
      <rs:requested-attribute id="0x12d7f" notify-of-changes="true" />
      <!-- Network Address -->
      <rs:requested-attribute id="0x11f4e" />
      <!-- Alarm Generation Date/Time -->
      <rs:requested-attribute id="0x11ee8" />
      <!-- Model Class -->
      <rs:requested-attribute id="0x11f9b" />
      <!-- Clearable -->
      <rs:requested-attribute id="0x11f57" notify-of-changes="true" />
      <!-- TroubleShooter -->
      <rs:requested-attribute id="0x11f4d" notify-of-changes="true" />
      <!--Acknowledged -->
      <rs:requested-attribute id="0x129fa" />
      <!--Model Handle -->
      <rs:requested-attribute id="0x11d42" />
      <!-- Landscape Name -->
      <rs:requested-attribute id="0x129ac" />
      <!-- Landscape Handle -->
      <rs:requested-attribute id="0x12a07" />
      <!-- CauseCount -->
      <rs:requested-attribute id="0x1000a" />
      <!-- Condition -->
   </rs:alarm-request>
</rs:subscription-request>