Global Collection Child Count Attribute in Spectrum
search cancel

Global Collection Child Count Attribute in Spectrum


Article ID: 215404


Updated On:


CA Spectrum


I have created some Global Collections to collect/group models where we see a certain combination of attribute values.

What I would like to do is be able to create a watch on on A Global Collection to say IF Child Count is greater than X raise event.

The trouble is I don't seem to be able to find an attribute for Global Collection Child count.  Is there one and is this possible to create a watch on?


Release : 10.4.1

Component : Spectrum Core / SpectroSERVER


Spectrum use a pseudo attribute to show the count of children of a Global Collection as it is not a static number that can be stored in a normal attribute. Pseudo attributes are used when development wants to display some type of data that either needs to be formatted to be readable or cannot simply be stored in an attribute. Using a pseudo attribute usually triggers some type of Java code to be executed on the OneClick Server to produce what is displayed.


To pull this information dynamically, you would need a custom method.

A. one possibility would be to make a cron job cli script to list the associations (show associations) of the global collection and count the output of dynamicGlobalCollects relationships. You can create an alarms/event from CLI based on the number received.


B. use the Restful API with the following POST models (GET Tunneling)

URL: http://<OC_server><:portnumber>/spectrum/restful/models
<?xml version="1.0" encoding="UTF-8"?>
<rs:model-request  throttlesize="100000"
xsi:schemaLocation=" ../../../xsd/Request.xsd">
            <attribute id="0x12adb">
              <!-- This attribute stores the list of global collections that contains the devices you want being processed
                          so change NOC-xx into yout GC name  -->
              <!-- Name of the Global Collection -->
  <!-- Model Name -->
  <rs:requested-attribute id="0x1006e" />
In the body you should supply the name of your GC and in the output you will have the model name of the models the global collection contains but you will have also the throttlesize actual value that identifies the number of models.

Additional Information

the <has-substring> comparison will only work correctly if there are no similarly named Global Collections.

We cannot use the <equals> comparison with the 0x12adb attribute if the models are members of more than 1 Global Collection which they usually are. 

In more recent versions the 0x12adb has been throttled to reduce impact on the SS.

Please use instead