04-23-2024 02:46 AM
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.
Solved! Go to Solution.
04-23-2024 04:09 AM
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
04-23-2024 04:27 AM
Hello,
exactly, you have to apply the discriminator:
logging buffered discriminator apples_oranges
logging console discriminator apples_oranges
logging monitor discriminator apples_oranges
04-23-2024 03:31 AM
- 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.
04-23-2024 04:09 AM
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
04-23-2024 04:12 AM
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.
04-23-2024 04:27 AM
Hello,
exactly, you have to apply the discriminator:
logging buffered discriminator apples_oranges
logging console discriminator apples_oranges
logging monitor discriminator apples_oranges
04-23-2024 04:46 AM
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.
04-23-2024 04:56 AM
- An snmp server can only receive snmp traps and as such these don't exist in that format ,
M.
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