networklore / nelkit

https://networklore.com/nelkit/
44 stars 17 forks source link

nk-compare multiple excludes #3

Closed davama closed 8 years ago

davama commented 8 years ago

Hello, This is a very neat software. Still learning how to use it. Thank you.

We were wondering if it is possible to do multiple excludes withing a "match" block:

rules:
 - match:
     string: '^snmp-server'
     exclude: '^snmp-server community public'
     exclude: '^snmp-server community <redacted>'

Currently the above would apply the last exclude which contains the "redacted" line.

Thanks Dave

ogenstad commented 8 years ago

Hi Dave,

Currently the exclude parameter only takes one argument. However you should be able to do this:

 - match:
     string: '^snmp-server'
     exclude: '^snmp-server community public|^snmp-server community <redacted>'

Please let me know if that works for you!

Regards Patrick

davama commented 8 years ago

That works perfectly.

Like i said we really like this software and how simple it is. Might not be the last you hear from us. :D

Thank you, Dave