What Does Monitor Logging Do in Cisco IOS?

ciscocisco-ioslogging

When doing sh log, I can see there is a monitor logging configured.

I know that console logging is send to the physical console port, and that buffer logging is sent to the memory of the Switch/Router, and trap logging is sent to a Syslog server. Where is the data going if logging Monitor is configured??

Best Answer

If you mean the terminal monitor command, that will send debug and system messages to the current terminal session. If you are connected to the device via a VTY line, you need to use this command to see those because it may look like you are connected the the CON line, but you are not.

Cisco maintains extensive documentation that is just a search away:

Cisco IOS Configuration Fundamentals Command Reference, Release 12.2:

terminal monitor

To display debug command output and system error messages for the current terminal and session, use the terminal monitor EXEC command.

terminal monitor

Syntax Description

This command has no arguments or keywords.

Defaults

Disabled

Command Modes

EXEC

Command History

enter image description here

Usage Guidelines

Remember that all terminal parameter-setting commands are set locally and do not remain in effect after a session is ended.

Examples

In the following example the system is configured to display debug command output and error messages during the current terminal session:

Router# terminal monitor

The logging montor command will enable terminal line (monitor) logging.

Cisco IOS Network Management Command Reference

logging monitor

To enable system message logging to the terminal lines (monitor connections), use the logging monitor command in global configuration mode. To disable logging to terminal lines other than the console line, use the no form of this command.

logging monitor [discriminator discr-name] [severity-level]

no logging monitor

Syntax Description

enter image description here

Command Default

The logging monitor function is disabled.

Command Modes

Global configuration (config)

Command History

enter image description here

Usage Guidelines

Specifying a severity-level causes messages both at that level and at numerically lower levels to be displayed to the monitor. Table 32 shows a list of levels and corresponding syslog definitions.

Table 32 Error Message Logging Priorities and Corresponding Syslog

Definitions

enter image description here

Examples

The following example shows how to specify that messages at levels 3 (errors), 2 (critical), 1 (alerts), and 0 (emergencies) be logged to monitor connections:

Router(config)# logging monitor 3

The following example shows how to use a discriminator named monitor1 to filter critical messages, meaning that messages at levels 0, 1, and 2 are filtered:

Router(config)# logging monitor discriminator monitor1 critical

Related Commands

enter image description here