DX NetOps

 View Only
  • 1.  What is the difference between Oneclick alarm filters and Restful alarm filters?

    Posted Aug 11, 2015 11:34 AM

    I want to build a Restful query to list the same alarms that are listed in Oneclick when I filter only by severity.

     

    When I try to list the critical alarms via REST using the attribute 0x11f56 (Severity) I get many more alarms than those

    that are listed in Oneclick with the same filter. I made sure the only attribute chosen in the Oneclick Alarm Filter dialog

    is the Severity.


    Which other attribute is used by Oneclick that explain that difference. I tried many others and, although the numbers

    got pretty close and even coincided some times, I was not able to find the exact attribute.



  • 2.  Re: What is the difference between Oneclick alarm filters and Restful alarm filters?
    Best Answer

    Posted Aug 11, 2015 11:58 AM

    I figured it out. It excludes alarms for models that are in maintenance. I just added that condition to my xml and now it is ok!



  • 3.  Re: What is the difference between Oneclick alarm filters and Restful alarm filters?

    Posted Aug 11, 2015 12:14 PM

    Hello Renato,

     

    Seems like you are seeing symptom alarms as well through Rest calls where as these are hidden by default in Oneclick

    Use the Get Tunneling to filter the symptom alarms

     

    Base URL

    http://<hostname><:portnumber>/spectrum/restful/alarms

     

    This solution will use the Get Tunneling (POST) to filter the Symptom alarms. All the symptom alarms will have the "CauseCount" value greater than ' 1 '. In this solution you will use a condition in the xml to get the actual count of alarms in Oneclick. All the alarms reporting an issue will have the  "CauseCount" equals to '0'.

     

     

    This Solution uses Google Chrome rest client to execute the xml file.

     

    Procedure:

     

     

    1. Download Google Chrome

    2. Once done open Google chrome -> Web store

    3. Search for Simple rest client .It will get added automatically to google chrome if you follow the actions on the window.

    4. Now an icon will appear on top right corner in google chrome which is simple rest client.

    5. Follow these fields in the client

     

     

    URL: Give http://<OC hostname:port> /spectrum/restful/alarms?

    Method : POST

    Headers: content-type:application/xml

    Data:

     

     

    <?xml version="1.0" encoding="UTF-8"?>

    <!--

     

     

     

     

    CA Technologies, Inc.

    One CA Plaza

    Islandia, NY 11749 USA

     

     

    Copyright (c) 2012 CA Technologies, Inc.

    All rights reserved.

     

     

    IN NO EVENT SHALL CA TECHNOLOGIES INCORPORATED BE LIABLE FOR

    ANY INCIDENTAL, INDIRECT, SPECIAL, OR CONSEQUENTIAL DAMAGES

    WHATSOEVER (INCLUDING BUT NOT LIMITED TO LOST PROFITS) ARISING OUT

    OF OR RELATED TO THIS SOFTWARE, EVEN IF CA TECHNOLOGIES INCORPORATED

    HAS BEEN ADVISED OF, KNOWN, OR SHOULD HAVE KNOWN, THE POSSIBILITY OF

    SUCH DAMAGES.

     

     

     

     

    -->

    ENVIRONMENT PROFILE EXISTS =

    <rs:alarm-request throttlesize="10"

    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

    ../../../xsd/Request.xsd ">

     

     

    <!--

    This xml can be posted to the Alarms URL to obtain

    attributes on the specified alarms

    -->

     

     

    <!-- Attributes of Interest -->

    <rs:attribute-filter>

    <search-criteria

    xmlns="http://www.ca.com/spectrum/restful/schema/filter">

    <filtered-models>

    <equals>

    <attribute id="0x12a07">

    <value>0</value>

    </attribute>

    </equals>

    </filtered-models>

    </search-criteria>

    </rs:attribute-filter>

    <rs:requested-attribute id="0x11f53" />

    <rs:requested-attribute id="0x10000" />

    <rs:requested-attribute id="0x11f56" />

    <rs:requested-attribute id="0x12b4c" />

    <rs:requested-attribute id="0x11f4d"/>

     

     

    <!-- Alarms of Interest -->

     

     

    </rs:alarm-request>

     

     

    Click on send.

     

     

    The output is displayed in the data column at the bottom of the same page. This contains the actual alarms displayed after filtering the symptom alarms. The output can be fed into the third part database or dashboard with some sort of scripting.

     

    Hope this helps



  • 4.  Re: What is the difference between Oneclick alarm filters and Restful alarm filters?

    Posted Aug 11, 2015 12:21 PM

    Hi Kothapall,

     

    The problem was actually that Oneclick does not show the alarms from models in maintenance. And is a good thing it does not.

     

    But thank you for the tips.



  • 5.  Re: What is the difference between Oneclick alarm filters and Restful alarm filters?

    Posted Aug 12, 2015 01:12 AM

    Ohh Cool

     

    So do you see the alarms for models in maintenance when you do a rest call ? I believe it should not as we don't process the events for a model in maintenance.



  • 6.  Re: What is the difference between Oneclick alarm filters and Restful alarm filters?

    Posted Aug 12, 2015 08:04 AM

    If the model has an alarm when put in maintenance Spectrum does not clear it. So many models in maintenance have an old critical alarm associated with it.



  • 7.  Re: What is the difference between Oneclick alarm filters and Restful alarm filters?

    Posted Aug 18, 2015 09:23 AM

    You will see all alarms if you don't provide a filter. By default the Alarm view in OneClick removes Maintenance, Suppressed, Normal and Initial Alarms. - so you only see Minor, Major and Critical.

     

    When querying using REST, it will always show you as much as it can, hence why you need to make sure your filters are filtering out what you don't want to see (or specifying what you DO want to see only!).

     

    You will find that there is a lot that the OneClick client does 'behind the scenes' regarding REST calls and trying to get things done via REST over doing it in the OneClick client!



  • 8.  Re: What is the difference between Oneclick alarm filters and Restful alarm filters?

    Posted Sep 04, 2015 03:19 PM

    True, next time I'll just use wireshark to see what is going on. This is what worked for me when I was trying to figure out RIB queries format for CAPC.