-
To use a syslog server as the destination device for debug messaging, follow these steps:
-
Enter the
logging <
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 thesyslog-ip-addr
>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. -
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.)
-
-
To use a CLI session on a destination device for debug messaging:
-
Enable the types of debug messages to be sent to configured syslog servers, the current session device, or both by entering the
debug
command and selecting the desired options.debug-type
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. -
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
orlogging 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
command.system-module
-
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: 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 |
|
|
Use the show debug
command to display the currently configured settings for:
Syntax:
Displays the currently configured debug logging destinations and message types selected for debugging purposes. (If no syslog server address is configured with the
logging
command, nosyslog-ip-addr
show debug
command output is displayed.)
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
andlogging system-module
commands.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 theshow 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.