cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
175
Views
3
Helpful
6
Replies

Trying to drop certain logging messages with discriminator

BruteForce
Level 1
Level 1

There's two network monitoring accounts that constantly log in and out of my devices, and it's making it difficult to use logs to troubleshoot issues because the logs are totally clogged up with useless messages. 

I looked at the forums on how to drop these and learned of the discriminator command, and tried to apply it to both usernames so I don't see them in the logs anymore. 

logging discriminator apples msg-body drops apples
logging discriminator oranges msg-body drops oranges
logging userinfo
logging buffered discriminator apples 200000

The bold commands are what I entered, and 'apples' and 'oranges' refer to the users that I don't want to see in the logs every time log in, out, authenticate successfully, or have a privilege level set. 

I'm not really sure why these messages keep showing up in my logs and would appreciate any help on what I can do to ignore them. 

2 Accepted Solutions

Accepted Solutions

Hello,

you have to use an '|' (or) operator. I am not sure which of the below will work, but try:

logging discriminator apples_oranges mnemonics drops apples|oranges

or

logging discriminator apples_oranges msg-body drops apples|oranges

View solution in original post

Hello,

exactly, you have to apply the discriminator:

logging buffered discriminator apples_oranges
logging console discriminator apples_oranges
logging monitor discriminator apples_oranges

View solution in original post

6 Replies 6

marce1000
VIP
VIP

 

 - You may combine the two as explained in https://community.cisco.com/t5/other-network-architecture-subjects/logging-discriminator-with-multiple-statements/td-p/1769860 with the reply from igorm1983 , I am not sure your syntax is completely correct when comparing to these examples ; also have a look at : 
                                https://bst.cloudapps.cisco.com/bugsearch/bug/CSCur45606

 M.
                   



-- ' 'Good body every evening' ' this sentence was once spotted on a logo at the entrance of a Weight Watchers Club !

Hello,

you have to use an '|' (or) operator. I am not sure which of the below will work, but try:

logging discriminator apples_oranges mnemonics drops apples|oranges

or

logging discriminator apples_oranges msg-body drops apples|oranges

Thank you, I'm testing this out now. And it seems after I create this filter, I have to apply it for it to take effect. In my case, I would apply it with 'logging buffered discriminator apples_oranges' so it wouldn't appear in the logs. 

Hello,

exactly, you have to apply the discriminator:

logging buffered discriminator apples_oranges
logging console discriminator apples_oranges
logging monitor discriminator apples_oranges

Thank you, this worked. Do you know if this discriminator I applied will stop these logs from getting to the snmp server if I do nothing else? I having logging buffered/console/monitor applied, but ideally the snmp server can still see these logs. 

 

 - An snmp server can only receive snmp traps and as such these don't exist in that format ,

 M.



-- ' 'Good body every evening' ' this sentence was once spotted on a logo at the entrance of a Weight Watchers Club !
Review Cisco Networking products for a $25 gift card