search cancel

How to Alarm If the Device Belongs To A Global Collection in Spectrum

book

Article ID: 215233

calendar_today

Updated On:

Products

CA Spectrum DX NetOps

Issue/Introduction

How can an Attributed ID be used to match against a Global Collection? And how can it be used in a custom event to raise an alarm on a device that is the specified GC? 

Environment

DX NetOps Spectrum Release : 20.2 or later

Resolution

One possible solution would be to check the CollectionsModelNameString/0x12adb attribute for the desired Global Collection name.

Example event procedure

0xfff00000 E 20 P "If( \
                      Regexp( \
                          ReadAttribute( \
                               { C CURRENT_MODEL }, \
                               { H 0x12adb } \
                             ), \
                          { S \"Lab Machines\" } \
                       ), \
                      CreateEventWithVariables( \
                            { C CURRENT_MODEL }, \
                            { H 0xfff00003 }, \
                            GetEventVariableList() \
                       ), \
                       Nill() \
                   )"

 

Attachments