05-09-2017 07:01 AM - edited 03-01-2019 03:48 AM
Hi,
With the command below I am able to find the devices that include the pub-1AS-gral community-set.
Is there a way to identify the devices that DO NOT include that community-set?
admin@ncs> show configuration devices device * config cisco-ios-xr:community-set | display set | match pub-1AS-gral
set devices device GRAFRAAC3 config cisco-ios-xr:community-set pub-1AS-gral set "ios-regex '12956:1001'"
set devices device GRAFRAAC3 config cisco-ios-xr:community-set pub-1AS-gral set "ios-regex '12956:2001'"
set devices device GRTLONTLW1 config cisco-ios-xr:community-set pub-1AS-gral set 12956:1001
set devices device GRTLONTLW1 config cisco-ios-xr:community-set pub-1AS-gral set 12956:2001
set devices device GRTLUREM6 config cisco-ios-xr:community-set pub-1AS-gral set "ios-regex '12956:1001'"
set devices device GRTLUREM6 config cisco-ios-xr:community-set pub-1AS-gral set "ios-regex '12956:3201'"
set devices device GRTMIANA4 config cisco-ios-xr:community-set pub-1AS-gral set 12956:1001
set devices device GRTMIANA4 config cisco-ios-xr:community-set pub-1AS-gral set 12956:3001
[ok][2017-02-13 18:07:59]
admin@ncs>
05-09-2017 07:01 AM
Hi,
Try “show config devices device config cisco-ios-xr:community-set | except pub-1AS-gral”
05-09-2017 07:02 AM
That command is showing me all the community-set configs except pub-1AS-gral…. But I am trying to identify the list of devices that are missing the pub-1AS-gral in the config.
I was trying to use filters using regexp, but I didn’t find the way to do it.
05-09-2017 07:02 AM
Apologies, accidentally hit send before completing the email..
That command below will return the community set for all devices where it is set, and it is not “pub-1AS-gral”.
05-09-2017 07:02 AM
Oh, you are right. The command I sent will return the devices that have a community-set that does not equal pub-1AS-gral. Devices that do not have a community set configured will not be returned.
To get a list of devices that are missing a particular config, you can create and run a compliance report. Overall steps are as follows:
set devices template test-fex config nx:fex 101 pinning max-links 1
set compliance reports report report1 compare-template test-fex
set devices device-group group1 device-name [ nx0 nx1 nx2 nx3 ]
set compliance reports report report1 compare-template test-fex group1
request compliance reports report report1 run outformat text
05-09-2017 07:03 AM
Thanks
I will try this tomorrow
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide