Configuring Syslog/debug operation

  1. To use a syslog server as the destination device for debug messaging, follow these steps:

    1. Enter the logging <syslog-ip-addr> command at the global configuration level to configure the syslog server IP address and enable syslog logging. Optionally, you may also specify the destination subsystem to be used on the syslog server by entering the logging facility command.

      If no other syslog server IP addresses are configured, entering the logging command enables both debug messaging to a syslog server and the event debug message type. As a result, the switch automatically sends Event Log messages to the syslog server, regardless of other debug types that may be configured.

    2. Re-enter the logging command in step a to configure additional syslog servers. You can configure up to a total of six servers. (When multiple server IP addresses are configured, the switch sends the debug message types that you configure in step Step 3 to all IP addresses.)

  2. To use a CLI session on a destination device for debug messaging:

    1. Set up a serial, Telnet, or SSH connection to access the switch's CLI.

    2. Enter the debug destination session command at the manager level.

  3. Enable the types of debug messages to be sent to configured syslog servers, the current session device, or both by entering the debug debug-type command and selecting the desired options.

    Repeat this step if necessary to enable multiple debug message types.

    By default, Event Log messages are sent to configured debug destination devices. To block Event Log messages from being sent, enter the no debug event command.

  4. If necessary, enable a subset of Event Log messages to be sent to configured syslog servers by specifying a severity level, a system module, or both using the following commands

    HP Switch(config)# logging severity
    [debug|major|error|warning|info]
    HP Switch(config)# logging system-module 
    
    
    system-module 
    

    To display a list of valid values for each command, enter logging severity or logging system-module followed by ? or pressing the Tab key.

    The severity levels in order from the highest to lowest severity are major, error, warning, info, and debug. For a list of valid values for the logging system-module system-module command.

  5. If you configure system-module, severity-level values, or both to filter Event Log messages, when you finish troubleshooting, you may want to reset these values to their default settings so that the switch sends all Event Log messages to configured debug destinations (syslog servers, CLI session, or both.)

    To remove a configured setting and restore the default values that send all Event Log messages, enter one or both of the following commands:

    HP Switch(config)# no logging severity
    [debug|major|error|warning|info]
    HP Switch(config)# no logging system-module 
    
    
    system-module 
    

[CAUTION: ]

CAUTION: If you configure a severity-level, system-module, logging destination, or logging facility value and save the settings to the startup configuration (for example, by entering the write memory command), the debug settings are saved after a system reboot (power cycle or reboot) and re-activated on the switch. As a result, after switch startup, one of the following situations may occur:

  • Only a partial set of Event Log messages may be sent to configured debug destinations.

  • Messages may be sent to a previously configured syslog server used in an earlier debugging session.


Viewing a syslog/debug configuration

Use the show debug command to display the currently configured settings for:

  • Debug message types and Event Log message filters (severity level and system module) sent to debug destinations

  • Debug destinations (syslog servers or CLI session) and syslog server facility to be used

Syntax:

show debug

Displays the currently configured debug logging destinations and message types selected for debugging purposes. (If no syslog server address is configured with the logging syslog-ip-addr command, no show debug command output is displayed.)

Sample output of show debug command

Sample output of show debug command

Example:

In the following example, no syslog servers are configured on the switch (default setting.) When you configure a syslog server, debug logging is enabled to send Event Log messages to the server. To limit the Event Log messages sent to the syslog server, specify a set of messages by entering the logging severity and logging system-module commands.

Syslog configuration to receive event log messages from specified system module and severity levels

Syslog configuration to receive event log messages from specified system module and severity levels

As shown at the top of Syslog configuration to receive event log messages from specified system module and severity levels, if you enter the show debug command when no syslog server IP address is configured, the configuration settings for syslog server facility, Event Log severity level, and system module are not displayed. However, after you configure a syslog server address and enable syslog logging, all debug and logging settings are displayed with the show debug command.

If you do not want Event Log messages sent to syslog servers, you can block the messages from being sent by entering the no debug event command. (There is no effect on the normal logging of messages in the switch's Event Log.)

Example:

The next example shows how to configure:

  • Debug logging of ACL and IP-OSPF packet messages on a syslog server at 18.38.64.164 (with user as the default logging facility.)

  • Display of these messages in the CLI session of your terminal device's management access to the switch.

  • Blocking Event Log messages from being sent from the switch to the syslog server and a CLI session.

To configure syslog operation in these ways with the debug/syslog feature disabled on the switch, enter the commands shown in Debug/syslog configuration for multiple debug types and multiple destinations.

Debug/syslog configuration for multiple debug types and multiple destinations

Debug/syslog configuration for multiple debug types and multiple destinations