ā04-13-2023 12:37 AM
Hey Everyone,
I have an issue with the syslog messages being sent to the console every time I do a debug and enable #terminal monitor. I have the logs sent to a remote server but I don't want them to impact the console output while debugging. Is there any way to disable syslog messages from going to the console output.
ā04-13-2023 12:43 AM
You send log to syslog server without see it in console I think
Only disable terminal monitor and keep enable log to host (server)
Try this
ā04-13-2023 01:13 AM
Sorry if I didn't explain myself very well. The Syslog logs indeed do not show up if I don't do #terminal monitor, but sometimes I have to do a debug session on the router, with that enabling #terminal monitor would push all of the syslogs to my output hindering the debug useless.
ā04-13-2023 01:23 AM
share the config if you can please
ā04-13-2023 04:29 AM
post show logging and show run (related to logging config)
its all depends on the device you have
below command should work :
no logging console
ā04-13-2023 04:39 AM
#show logging output:
Syslog logging: enabled (0 messages dropped, 583339540 messages rate-limited, 0 flushes, 0 overruns, xml disabled, filtering disabled)
No Active Message Discriminator.
No Inactive Message Discriminator.
Console logging: level debugging, 303644663 messages logged, xml disabled,
filtering disabled
Monitor logging: level debugging, 91066 messages logged, xml disabled,
filtering disabled
Buffer logging: level debugging, 303645158 messages logged, xml disabled,
filtering disabled
Exception Logging: size (4096 bytes)
Count and timestamp logging messages: disabled
Persistent logging: enabled, url bootflash:/syslog, disk space 1000000 bytes, file size 8192 bytes, batch size 4096 bytes, threshold capacity 0 , immediate
No active filter modules.
Trap logging: level debugging, 312108236 message lines logged
Logging to 10.10.1.17 (udp port 27104, audit disabled,
link up),
253355356 message lines logged,
0 message lines rate-limited,
0 message lines dropped-by-MD,
xml disabled, sequence number disabled
filtering disabled
Logging to 10.10.1.18 (tcp port 27104, audit disabled,
link up),
247992760 message lines logged,
0 message lines rate-limited,
0 message lines dropped-by-MD,
xml disabled, sequence number disabled
filtering disabled
Logging Source-Interface: VRF Name:
Log Buffer (131072 bytes):
#show run output:
service timestamps log datetime msec
logging userinfo
logging persistent size 1000000 filesize 8192 immediate
logging rate-limit all 10
login block-for 300 attempts 3 within 50
login on-failure log
login on-success log
log config
logging enable
logging size 200
notify syslog contenttype plaintext
crypto logging session
crypto logging ikev2
ip access-list logging interval 10
logging trap debugging
logging origin-id string cisco2
logging facility auth
logging host 10.10.1.17 transport udp port 27104
logging host 10.10.1.18 transport tcp port 27104
20 deny any log
logging synchronous
login local
ntp logging
ā04-13-2023 04:40 AM
the command didn't work
#no logging console
as soon as I execute #terminal monitor, all of the syslog messages outputs to the tty.
ā04-13-2023 04:45 AM
No logging sync
Then
Logging sync
And check again.
ā04-13-2023 04:52 AM
didn't work, Syslog messages are still outputting to tty.
ā04-13-2023 04:58 AM - edited ā04-13-2023 06:09 AM
I now review the info. You share
Thanks
MHM
ā04-13-2023 05:00 AM
Hey @MHM Cisco World , do you mean the IP where I SSH to the router (router IP)?
ā04-13-2023 01:36 PM
Hi friend
config the console level below 7 (debug)
this make you run console and dont see debug and in same time the debug send to syslog server.
try this way.
thanks
ā04-13-2023 10:04 PM - edited ā04-13-2023 10:05 PM
command should be in config mode
config t
no logging console
exit
Console logging: level debugging, <-- this will lock you console when you enable debug
suggested config is
config t
logging console inform
end
ā04-24-2023 01:17 AM
@balaji.bandi and @MHM Cisco World appreciate the tremendous help. What I am actually trying to do is not disabling the debug messages from popping into the console. I want to stop all syslog messages from showing in the tty while I am doing a debug. Say for example I am doing a #crypto debug, I don't want the syslog messages and the crypto debug messages to scramble together when I execute #terminal monitor, I just want to see the debug messages.
ā04-24-2023 02:01 AM - edited ā04-24-2023 02:10 AM
but as I mention before if you want to enter debug and not make debug show in console use
NO logging synchronous
under the console line Or VTY (if you use telnet or ssh)
if you want other log message to appear and only debug not appear then as I mention before adjust the log level
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