How to determine a Spectrum Watches status on multiple models at the same time
search cancel

How to determine a Spectrum Watches status on multiple models at the same time

book

Article ID: 112311

calendar_today

Updated On:

Products

CA Spectrum DX NetOps

Issue/Introduction

We have been doing a lot of changes to this landscape. Is there a quick way to determine if a watch is not activated on a device in a pool of 500 devices without checking each one individually?

Environment

DX NetOps Spectrum all currently supported releases

Resolution

At this time there is no built-in feature which would show the Watch Status on a group of models. Each watch status is shown when viewing information on a particular model. Watches get assigned to model types. So it takes some work to get the watch status as it is shows applied to a model. 

You can check status individually but to get a list output, this would need to be scripted using CLI commands.

1. First you want to check for the model type the Watch is applied to. This can be checked on the Watch itself by editing the Watch and checking the Properties tab - the section of Model type will list the model type name. You can also see the model type name the Watch is applied to in OneClick Admin web page > Watch Report. This report won't show you individual models and the active status, but will show you most everything else about the Watch. If you are viewing the Watch on a model, you can go to the Attributes tab of the model and look up the Modeltype_Handle 0x10001. This should be the model type handle of the device.

2. Then nav to /vnmsh

3. run ./connect

4. run ./show models | grep -i <model type handle>

5. The output will show the model handles of each device of that model type on the left

6. run ./show watch mh=<device model handle> 

7. The output will show what watches are applied to that model and the current status active/inactive

Example: 


To script it you would want to extract the list of model handles from output obtained from step 4 and process them through the command in line 6, and output to a file which can give you a list of each model and the watch statuses. For example in bash shell;

for MHandle in `./connect; ./show models | grep "^0x" | cut -d' ' -f1`
do
     ./show watch mh=$MHandle >> watch_report.out
done;