logging monitor enables real-time Syslog messages on Cisco IOS VTY lines used by Telnet or SSH sessions. It is enabled by default, but each VTY session must also run terminal monitor in privileged EXEC mode before messages appear. section 7.1.1
Key operational facts:
- Disable VTY-line logging globally with no logging monitor. section 7.1.1
- Enable monitoring for the current Telnet or SSH session with terminal monitor; repeat it after reconnecting, and have each simultaneous user run it independently. section 7.1.1
- The default monitor threshold is debugging, so severity levels 0 through 7 are displayed; specifying a level includes that level and all numerically lower levels. section 7.2.2
Verify real-time VTY logging
SW1(config)# logging monitor SW1# terminal monitor After an interface state change, Syslog messages such as %LINK-3-UPDOWN and %LINEPROTO-5-UPDOWN appear in the active session. Without terminal monitor, the same VTY session displays no real-time messages. section 7.1.1
SW1(config)# interface g0/1 SW1(config-if)# shutdown #1 SW1(config-if)# do terminal monitor #2 SW1(config-if)# no shutdown #3 Sep 18 02:17:46.867: %LINK-3-UPDOWN: Interface FastEthernet0/3, changed state to up #4 Sep 18 02:17:47.874: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to up #4 #1 No Syslog messages are shown after disabling G0/1. #2 Enables real-time logging for the session #3 Reenables the interface #4 Syslog messages are displayed.
Shows interface shutdown and reactivation commands alongside terminal monitor and the resulting Syslog output. section 7.1.1
