Syslog commands

syslog

Syntax

[no] syslog syslog-id

Context

config>log

Platforms

Supported on all 7210 SAS platforms as described in this document

Description

Commands in this context configure a syslog target host that is capable of receiving selected syslog messages from this network element.

A valid syslog-id must have the target syslog host address configured. A maximum of 10 syslog IDs can be configured.

No log events are sent to a syslog target address until the syslog-id has been configured as the log destination (to) in the log-id node.

The no form of this command removes the syslog configuration.

Parameters

syslog-id

Specifies the syslog ID number for the syslog destination, expressed as a decimal integer.

Values

1 to 10

address

Syntax

address ip-address

no address

Context

config>log>syslog

Platforms

Supported on all 7210 SAS platforms as described in this document

Description

This command adds the syslog target host IP address to/from a syslog ID.

This parameter is mandatory. If no address is configured, syslog data cannot be forwarded to the syslog target host.

Only one address can be associated with a syslog-id. If multiple addresses are entered, the last address entered overwrites the previous address.

The same syslog target host can be used by multiple log IDs.

The no form of this command removes the syslog target host IP address.

Default

no address

Parameters

ip-address

Specifies the IP address of the syslog target host in dotted decimal notation.

Values

ipv4-address — a.b.c.d

ipv6-address — x:x:x:x:x:x:x:x (eight 16-bit pieces)

x:x:x:x:x:x:d.d.d.d

x — [0..FFFF]H

d — [0..255]D

facility

Syntax

facility syslog-facility

no facility

Context

config>log>syslog

Platforms

Supported on all 7210 SAS platforms as described in this document

Description

This command configures the facility code for messages sent to the syslog target host.

Multiple syslog IDs can be created with the same target host, but each syslog ID can only have one facility code. If multiple facility codes are entered, the last facility code entered overwrites the previous facility code.

If multiple facilities need to be generated for a single syslog target host, multiple log ID entries must be created, each with its own filter criteria to select the events to be sent to the syslog target host with a specific facility code.

The no form of this command reverts to the default value.

Default

facility local7

Parameters

syslog-facility

Specifies the syslog facility name. The syslog facility name represents a specific numeric facility code. The code should be entered in accordance with the syslog RFC. However, the software does not validate if the facility code configured is appropriate for the event type being sent to the syslog target host.

Values

kernel, user, mail, systemd, auth, syslogd, printer, netnews, uucp, cron, authpriv, ftp, ntp, logaudit, logalert, cron2, local0, local1, local2, local3, local4, local5, local6, local7

The following table lists valid responses in accordance with RFC 3164, The BSD syslog Protocol.

Table: Facility codes

Numerical code

Facility code

0

kernel

1

user

2

mail

3

systemd

4

auth

5

syslogd

6

printer

7

net-news

8

uucp

9

cron

10

auth-priv

11

ftp

12

ntp

13

log-audit

14

log-alert

15

cron2

16

local0

17

local1

18

local2

19

local3

20

local4

21

local5

22

local6

23

local7

log-prefix

Syntax

log-prefix log-prefix-string

no log-prefix

Context

config>log>syslog

Platforms

Supported on all 7210 SAS platforms as described in this document

Description

This command adds the string prepended to every syslog message sent to the syslog host.

RFC 3164, The BSD syslog Protocol, allows an alphanumeric string (tag) to be prepended to the content of every log message sent to the syslog host. This alphanumeric string can, for example, be used to identify the node that generates the log entry. The software appends a colon (:) and a space to the string and it is inserted in the syslog message after the date stamp and before the syslog message content.

Only one string can be entered. If multiple strings are entered, the last string overwrites the previous string. The alphanumeric string can contain lowercase (a-z), uppercase (A-Z), and numeric (0-9) characters.

The no form of this command removes the log prefix string.

Default

no log-prefix

Parameters

log-prefix-string

Specifies an alphanumeric string, up to 32 characters. Spaces and colons cannot be used in the string.

level

Syntax

level syslog-level

no level

Context

config>log>syslog

Platforms

Supported on all 7210 SAS platforms as described in this document

Description

This command configures the syslog message severity level threshold. All messages with a severity level equal to or higher than the threshold are sent to the syslog target host. Severity levels are shown in Table: Syslog message severity levels.

Only a single threshold level can be specified. If multiple levels are entered, the last level entered overwrites the previously entered commands.

The no form of this command reverts to the default value.

Default

level info

Parameters

syslog-level

Specifies the threshold severity level name.

Values

emergency, alert, critical, error, warning, notice, info, debug

Table: Syslog message severity levels

Severity level

Numerical severity (highest to lowest)

Configured severity

Definition

0

emergency

system is unusable

3

1

alert

action must be taken immediately

4

2

critical

critical condition

5

3

error

error condition

6

4

warning

warning condition

5

notice

normal but significant condition

1 cleared

2 indeterminate

6

info

informational messages

7

debug

debug-level messages

port

Syntax

port port

no port

Context

config>log>syslog

Platforms

Supported on all 7210 SAS platforms as described in this document

Description

This command configures the UDP port that is used to send syslog messages to the syslog target host.

The port configuration is needed if the syslog target host uses a port other than the standard UDP syslog port 514.

Only one port can be configured. If multiple port commands are entered, the last entered port overwrites the previously entered ports.

The no form of this command removes the value from the configuration.

Default

no port

Parameters

port

Specifies the UDP port number to use when sending syslog messages.

Values

0 to 65535

throttle-rate

Syntax

throttle-rate events [interval seconds]

no throttle-rate

Context

config>log

Platforms

Supported on all 7210 SAS platforms as described in this document

Description

This command configures an event throttling rate.

Parameters

events

Specifies the number of log events that can be logged within the specified interval for a specific event. When the limit is reached, any additional events of that type are dropped, for example, the event drop count is incremented. At the end of the throttle interval, if any events have been dropped, a trap notification is sent.

Values

10 to 20000

Default

500

interval seconds

Specifies the number of seconds that an event throttling interval lasts.

Values

1 to 60

Default

1