configure log target filter

configure log target [console | memory-buffer | primary-msm | primary-node | backup-msm | backup-node | nvram | session | syslog [all | ipaddress {udp-port udp_port} | ipPort {vr vr_name} [local0...local7]]] filter filter-name {severity severity {only}}

Description

Associates a filter to a target.

In a stack, this command is applicable only to Master and Backup nodes. This command is not applicable to standby nodes.

Syntax Description

target Specifies the device to send the log entries.
console Specifies the console display.
memory-buffer Specifies the switch memory buffer.
primary-msm Specifies the primary MSM.
Note: This parameter is available only on modular switches.
primary-node Specifies the primary node in a stack.
backup-msm Specifies the backup MSM.
Note: This parameter is available only on modular switches.
backup-node Specifies the backup node in a stack.
nvram Specifies the switch NVRAM.
session Specifies the current session (including console display).
syslog Specifies a syslog remote server.
all Specifies all of the syslog remote servers.
ipaddress Specifies the syslog IP address.
ipPort Specifies the UDP port number for the syslog target.
vr_name Specifies the virtual router that can reach the server IP address.
Note: User-created VRs are supported only on the platforms listed for this feature in the Feature License Requirements document.
local0 ... local7 Specifies the local syslog facility.
filter-name Specifies the filter to associate with the target.
severity Specifies the minimum severity level to send (if the keyword only is omitted).
only Specifies that only the specified severity level is to be sent.

Default

If severity is not specified, the severity level for the target is left unchanged. If a virtual router is not specified, VR-Mgmt is used.

Usage Guidelines

This command associates the specified filter and severity with the specified target. A filter limits messages sent to a target.

Although each target can be configured with its own filter, by default, all targets are associated with the built-in filter, DefaultFilter. Each target can also be configured with its own severity level. This provides the ability to associate multiple targets with the same filter, while having a configurable severity level for each target.

A message is sent to a target if the target has been enabled, the message passes the associated filter, the message is at least as severe as the configured severity level, and the message output matches the regular expression specified. By default, the memory buffer, NVRAM, primary MSM/MM, and backup MSM/MM targets are enabled. For other targets, use the command enable log target. The following table describes the default characteristics of each type of target.

expand icon

Default target log characteristics

Target Enabled Severity Level
console display no info
memory buffer yes debug-data
NVRAM yes warning
primary MSM/MM yes warning
backup MSM/MM yes warning
session no info
syslog no debug-data

The built-in filter, DefaultFilter, and a severity level of info are used for each new telnet session. These values may be overridden on a per-session basis using the configure log target filter command and specify the target as session. Use the following form of the command for per-session configuration changes:

configure log target session filter filtername {severity severity {only}}

Configuration changes to the current session target are in effect only for the duration of the session, and are not saved in FLASH memory. The session option can also be used on the console display, if the changes are desired to be temporary. If changes to the console-display are to be permanent (saved to FLASH memory), use the following form of the command:

configure log target console filter filtername {severity severity {only}}

Modular Switches Only

If the condition for the backup-msm target is met by a message generated on the primary, the event is sent to the backup MSM/MM. When the backup MSM/MM receives the event, it will see if any of the local targets (nvram, memory, or console) are matched. If so it gets processed. The session and syslog targets are disabled on the backup MSM/MM, as they are handled on the primary. If the condition for the primary-msm target is met by a message generated on the backup, the event is sent to the primary MSM.

Note that the backup-msm target is only active on the primary MSM/MM, and the primary-msm target is only active on the backup MSM/MM.

SummitStack Only

The backup-node target is only active on the primary-node, and the primary-node target is active on backup-node and standby-nodes.

Example

The following example sends log messages to the previously syslog host at 10.31.8.25, port 8993, and facility local3, that pass the filter myFilter and are of severity warning and above:

configure log target syslog 10.31.8.25:8993 local3 filter myFilter severity warning

The following example sends log messages to the current session, that pass the filter myFilter and are of severity warning and above:

configure log target session filter myFilter severity warning

History

This command was first available in ExtremeXOS 10.1.

The primary-msm and backup-msm options were first available in ExtremeXOS 11.0.

The ipPort parameter was first available in ExtremeXOS 11.1.

The udp-port parameter was added in ExtremeXOS 21.1.

Platform Availability

This command is available on all platforms.