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.
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!
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
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.
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
<?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
ENVIRONMENT PROFILE EXISTS =
This xml can be posted to the Alarms URL to obtain
attributes on the specified alarms
<!-- Attributes of Interest -->
<rs:requested-attribute id="0x11f53" />
<rs:requested-attribute id="0x10000" />
<rs:requested-attribute id="0x11f56" />
<rs:requested-attribute id="0x12b4c" />
<!-- Alarms of Interest -->
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
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.
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.
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.
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!
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.