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
So I put those 3 lines in my compliance templates
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 ?
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.
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 :
second router :
third router :
If I run those exclusion patterns (- logging [#..*\..*\..*\..*#]) or (- logging [#.*#]) with the 2 + logging command I have the following :
first router (both colored green) :
second router (first colored red, second colored green):
third router (first two colored red, third colored green):
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):
third router (colored green):
| +logging 188.8.131.52|
***NOTE : It should have marked the third one with the line - logging 184.108.40.206 also but he doesn't ***
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 ?
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
logging buffered 200000
no logging console
logging esm config
I took care of the screenshot you sent me but I'm still having the same issue.
|Device Name||Latest Version||Created On||Command(s) to Deploy|
|F.D.4182535484.R001.familiprix.net||3||Feb 14 2014 02:31:54|
|F.D.4182685326.R001.familiprix.net||2||Jan 28 2014 15:58:50|
|F.D.4182750941.R001.familiprix.net||3||Jan 28 2014 15:47:22|
|F.D.4182863301.R001.familiprix.net||14||Feb 16 2014 02:00:14|
|F.D.4182893069.R001.familiprix.net||5||Jan 28 2014 15:51:00|
|F.D.4183283358.R001.familiprix.net||4||Jan 28 2014 15:47:19|
Use the ADVANCE Template option with these line
+ logging 10.10.10.1
+ logging 220.127.116.11
- logging [#.*#]
this should work
[Do rate the useful post]