cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
717
Views
0
Helpful
10
Replies
Highlighted
Beginner

Baseline compliance wildcard pattern

I want to check for the existence of the following two logging serveur into my router devices.  I also want to make sure there's only those two logging server in my configuration

Here's my logging server

10.10.10.1

11.11.11.1

So I put those 3 lines in my compliance templates

+logging 10.10.10.1

+logging 11.11.11.1

-logging  [#.*#]

I figure out that the exclusion pattern doesn't work (-logging  [#.*#])

Is there a way to make a proper exclusion or should I always know the term that I want to exclude ?

Thanks !!!

10 REPLIES 10
Highlighted
Hall of Fame Guru

I'm not sure if it's causing your issue, but I believe the "-" needs to be followed by a space. Please refer to the whitepaper on compliance templates here, page 27, which states:

All commands should have a space between the – or +. If there is no space, the commands are considered as comments and are ignored.

Highlighted

I take a look at my compliance template and I had the space after my plus or minus sign.   Any other Idea ?

Thanks

Highlighted

Can you try one of the following :

+ logging 10.10.10.1

+ logging 11.11.11.1

- logging [#..*\..*\..*\..*#]

OR

+ logging 10.10.10.1

+ logging 11.11.11.1

- [# logging .*#]

Check and let me know the updates.

-Thanks

Vinod

**Rating Encourages contributors, and its really free. **

-Thanks Vinod **Rating Encourages contributors, and its really free. **
Highlighted

I tried all of your exclusion pattern even Afroj's one but it doesn't works.  Let me show you what it does.

To make it simple I'll only use 3 devices

first router :

logging 10.10.10.1

logging 11.11.11.1

second router :

logging 10.10.10.1

third router :

logging 10.10.10.1

logging 12.12.12.1

If I run those exclusion patterns (- logging [#..*\..*\..*\..*#]) or (- logging [#.*#]) with the 2 + logging command I have the following :

first router (both colored green) :

  -logging 10.10.10.1
  -logging 11.11.11.1

second router (first colored red, second colored green):

  -logging 10.10.10.1
  +logging 11.11.11.1

third router (first two colored red, third colored green):

  -logging 10.10.10.1
  -logging 12.12.12.1
  +logging 11.11.11.1

If I run this exclusion patterns (- [# logging .*#) with the 2 + logging command I have the following :

first router (mark as compliant) :

second router (colored green):

  +logging 11.11.11.1

third router (colored green):

  +logging 11.11.11.1

***NOTE : It should have marked the third one with the line - logging 12.12.12.1 also but he doesn't ***

Highlighted

I remove the space just before the logging word of that one :

- [# logging .*#]

then all of the 3 exclusions give me the same things.

Highlighted

Hi,

share your template with us.

Thanks-

Afroz

Thanks- Afroz [Do rate the useful post] ****Ratings Encourages Contributors ****
Highlighted

You got it. 

It's the only thing I have in my template for now.  I have nothing more.

My thought are that prime can use the "include all" wildcard [#.*#] but only with inclusion line not exclusion.  Is that make sence ?

Highlighted

Hi ,

that  should not be the case..

share the output of below command from your device.

#show run | i logging

I run the same commands with Advance Template   , use the same commands i n GLOBAL mode

and it work fine.

can you check again.. I have attached one screen shot

Thanks-

Afroz

Thanks- Afroz [Do rate the useful post] ****Ratings Encourages Contributors ****
Highlighted

logging buffered 200000

no logging console

logging esm config

logging 10.10.10.1

logging 11.11.11.1

I took care of the screenshot you sent me but I'm still having the same issue. 

Device NameLatest VersionCreated OnCommand(s) to Deploy
F.D.4182535484.R001.familiprix.net3Feb 14 2014 02:31:54
  -logging 10.10.10.1
  -logging 11.11.11.1
F.D.4182685326.R001.familiprix.net2Jan 28 2014 15:58:50
  -logging 10.10.10.1
  -logging 11.11.11.1
F.D.4182750941.R001.familiprix.net3Jan 28 2014 15:47:22
  -logging 10.10.10.1
  -logging 11.11.11.1
F.D.4182863301.R001.familiprix.net14Feb 16 2014 02:00:14
  -logging 10.10.10.1
  -logging 11.11.11.1
F.D.4182893069.R001.familiprix.net5Jan 28 2014 15:51:00
  -logging 10.10.10.1
  -logging 11.11.11.1
F.D.4183283358.R001.familiprix.net4Jan 28 2014 15:47:19
  -logging 10.10.10.1
  -logging 11.11.11.1
Highlighted

Hi ,

Use the ADVANCE Template option with these line

+ logging 10.10.10.1

+ logging 11.11.11.1

- logging [#.*#]

this should work

Thanks-

Afroz

[Do rate the useful post]

Thanks- Afroz [Do rate the useful post] ****Ratings Encourages Contributors ****
Content for Community-Ad