Sun Ethernet Fabric Operating System CLI Base Reference Manual
|
  
|
Syslog |
Syslog is a protocol used for capturing log information for devices on a network. The syslog protocol provides a transport to allow a machine to send event notification messages across IP networks to event message collectors, also known as syslog servers. The protocol is simply designed to transport the event messages.
One of the fundamental tenets of the syslog protocol and process is its simplicity. The transmission of syslog messages may be started on a device without a receiver being configured, or even actually physically present. This simplicity has greatly aided the acceptance and deployment of syslog.
8.1 Syslog Commands
The list of CLI commands for the configuration of syslog is as follows:
8.1.1 logging
Enables syslog server and configures the syslog server IP address, the log-level and other syslog related parameters. The no form of the command disables syslog server and resets the configured syslog server IP address, the log-level and other syslog related parameters.
logging {ip-address | buffered size_1-200 | console | facility {local0 | local1 | local2 | local3 | local4 | local5 | local6 | local7} | severity [{level_0-7 | alerts | critical | debugging | emergencies | errors | informational | notification | warnings}] | on}
|
no logging {ip-address | buffered | console | facility | severity | on}
|
Syntax Description
|
ip-address - Host IP address used as a syslog server.
buffered - Limits Syslog messages displayed from an internal buffer. This size ranges between 1 and 200 entries.The size feature is optional only in the code using the industrial standard command, otherwise this feature is required.
console - Limits messages logged to the console.
facility - The facility that is indicated in the message. Can be one of the following values: local0, local1, local2, local3, local4, local5, local6, local7.
severity - Messages with severity level equal to or higher than the specified value are printed asynchronously. Severity can be configured with numerical value or using the available option. The options are:
- 0 | emergencies - System is unusable.
- 1 | alerts - Immediate action needed.
- 2 | critical - Critical conditions.
- 3 | errors - Error conditions.
- 4 | warnings - Warning conditions.
- 5 | notification - Normal but significant conditions.
- 6 | informational - Informational messages.
- 7 | debugging - Debugging messages.
alerts - Immediate action needed.
critical - Critical conditions.
debugging - Debugging messages.
emergencies - System is unusable.
errors - Error conditions.
informational - Information messages.
notification - Normal but significant messages.
warnings - Warning conditions.
on - Syslog enabled.
|
Mode
|
Global Configuration
|
Defaults
|
console - Enabled.
severity - Informational when no option is selected during. configuration debugging at system start-up.
buffered - 50.
facility - local0.
|
Example
|
SEFOS(config)# logging 12.0.0.2
|
Notes
|
- The log file is stored in ASCII text format. The Privileged EXEC command is used to display its contents.
- The logging process controls the distribution of logging messages to the various destinations, such as the logging buffer, logging file, or syslog server.
- The existing syslog buffers will not be cleared and none of the configured options will be changed, when the syslog feature is disabled.
|
show logging - Displays Logging status and configuration information
8.1.2 mailserver
Sets the mail server IP address to be used for sending email alert messages. The no form of the command re-sets the mail server IP address used for sending email alert messages.
Mode
|
Global Configuration
|
Example
|
SEFOS(config)# mailserver 23.78.67.89
|
Notes
|
Initially, the mail server has to be configured, for the show email alerts command.
|
- logging - Enables Syslog Server and configures the Syslog Server IP address, the log-level and other Syslog related parameter
- show email alerts - Displays email alerts related configuration
8.1.3 sender mail-id
Sets the sender mail identifier. The no form of the command deletes the configured sender mail identifier.
Mode
|
Global Configuration
|
Defaults
|
syslog@sun.com
|
Example
|
SEFOS(config)# sender mail-id smith@sun.com
|
Notes
|
- The mail server must be configured.
- The sender and receiver email-ids are mandatory for email alert messages to be sent.
|
- mailserver - Sets the mail server IP address to be used for sending email alert messages
- logging - Enables Syslog Server and configures the Syslog Server IP address, the log-level and other Syslog related parameter
- show logging - Displays Logging status and configuration information
- show email alerts - Displays email alerts related configuration
- receiver mail-id - Sets the receiver mail identifier
8.1.4 receiver mail-id
Sets the receiver mail-id. The no form of the command deletes the configured receiver mail-id.
Mode
|
Global Configuration
|
Defaults
|
admin@sun.com
|
Example
|
SEFOS(config)# receiver mail-id smith@sun.com
|
Notes
|
- The mail server must be configured.
- The sender and receiver email-ids are mandatory for email alert messages to be sent.
|
- logging - Enables Syslog Server and configures the Syslog Server IP address, the log-level and other Syslog related parameter
- show logging - Displays Logging status and configuration information
8.1.5 cmdbuffs
Configures the number of syslog buffers for a particular user.
cmdbuffs user-name buffers_1-200
|
Syntax Description
|
user-name - User name.
buffers_1-200 - Number of log buffers to be allocated in the system.
|
Mode
|
Global Configuration
|
Defaults
|
50.
|
Example
|
SEFOS(config)# cmdbuffs products 50
|
Notes
|
CLI related events like commands given by the user (login or logout and so on) can be logged on to the syslog server.
|
- logging - Enables syslog server and configures the syslog server IP address, the log-level and other syslog related parameter
- show logging - Displays logging status and configuration information
8.1.6 service timestamps
Enables timestamp option for logged messages. The no form of the command disables timestamp option for logged messages.
Mode
|
Global Configuration
|
Defaults
|
Enabled.
|
Example
|
SEFOS(config)# service timestamps
|
Notes
|
- When enabled, the messages (log and email alert messages) will hold the time stamp information.
- When disabled, the time stamp information will not be carried with the messages sent to the log and mail servers.
|
- logging - Enables Syslog Server and configures the Syslog Server IP address, the log-level and other Syslog related parameter
- show logging - Displays Logging status and configuration information
8.1.7 clear logs
Clears the system syslog buffers.
Mode
|
Global Configuration Mode
|
Example
|
SEFOS(config)# clear logs
|
- cmdbuffs - Configures the number of Syslog buffers for a particular user
- logging - Enables Syslog Server and configures the Syslog Server IP address, the log-level and other Syslog related parameter
- show logging - Displays Logging status and configuration information
8.1.8 syslog mail
Enables the mail option in syslog. The no form of command disables the mail option in syslog.
Mode
|
Global Configuration
|
Example
|
SEFOS(config)# syslog mail
|
8.1.9 syslog localstorage
Enables the syslog local storage. The no form of command disables the syslog local storage.
Mode
|
Global Configuration
|
Example
|
SEFOS(config)# syslog localstorage
|
8.1.10 syslog filename-one
Configures the file name to store the syslog messages. The maximum size of the file name is 32.
syslog filename-one string_32
|
Mode
|
Global Configuration
|
Example
|
SEFOS(config)# syslog filename-one log1
|
Notes
|
Syslog localstorage must be enabled.
|
8.1.11 syslog filename-two
Configures the file name to store the syslog messages. The maximum size of the file name is 32.
syslog filename-two string_32
|
Mode
|
Global Configuration
|
Example
|
SEFOS(config)# syslog filename-two SEFOS2
|
Notes
|
Syslog localstorage must be enabled.
|
8.1.12 syslog filename-three
Configures the file name to store the syslog messages. The maximum size of the file name is 32.
syslog filename-three string_32
|
Mode
|
Global Configuration
|
Example
|
SEFOS(config)# syslog filename-three SEFOS3
|
Notes
|
Syslog localstorage must be enabled.
|
8.1.13 syslog relay-port
Sets the syslog port through which it receives the syslog messages. The no form of command sets the syslog port to default port 514.
syslog relay-port integer_0-65535
|
Mode
|
Global Configuration
|
Example
|
SEFOS(config)# syslog relay-port 500
|
Notes
|
Syslog relay must be enabled.
|
8.1.14 logging-file
Adds an entry in to file table. The no form of command deletes an entry from the file table.
logging-file short_0-191 string_32
|
no logging-file short_0-191 string_32
|
Syntax Description
|
short_0-191 - Priority of syslog messages. 0-lowest priority, 191-highest priority.
string_32 - File name.
|
Mode
|
Global Configuration
|
Example
|
SEFOS(config)# logging-file 134 log1
|
Notes
|
Syslog localstorage must be enabled.
|
8.1.15 logging-server
Adds an entry in to logging-server table. The no form of command deletes an entry from forward table.
logging-server short_0-191 {ipv4 ucast-address} [ port integer_0-65535] [{udp | tcp | beep}]
|
no logging-server short_0-191 {ipv4 ucast-address}
|
Syntax Description
|
short_0-191 - Priority of syslog messages. 0-lowest priority, 191-highest priority.
ipv4 - Version 4 IP address.
port - Port number.
udp,tcp,beep - Sets the transport type as either UDP, TCP, or beep.
|
Mode
|
Global Configuration
|
Example
|
SEFOS(config)# logging-server 134 ipv4 12.0.0.3
|
show logging-server - Displays the syslog logging-server table
8.1.16 mail-server
Adds an entry to mail-server table. The no form of command deletes an entry from mail table.
mail-server short_0-191 {ipv4 ucast-address} string_50
|
no mail-server short_0-191 {ipv4 ucast-address}
|
Syntax Description
|
short_0-191 - Priority of syslog messages. 0-lowest priority, 191-highest priority.
ipv4 - Version 4 IP address.
|
Mode
|
Global Configuration
|
Example
|
SEFOS(config)# mail-server 134 ipv4 12.0.0.100 root@localhost
|
8.1.17 syslog relay
Changes the syslog role from device to relay. The no form of command changes the syslog role from relay to device.
Mode
|
Global Configuration
|
Example
|
SEFOS(config)# syslog relay
|
8.1.18 syslog relay transport type
Sets the syslog relay transport type either as udp or tcp.
syslog relay transport type {udp | tcp}
|
Syntax Description
|
udp - Sets the relay transport type as UDP.
tcp - Sets the relay transport type as TCP.
|
Mode
|
Global Configuration
|
Example
|
SEFOS(config)# syslog relay transport type udp
|
Notes
|
Syslog relay must be enabled.
|
8.1.19 show logging
Displays logging status and configuration information.
Mode
|
Privileged EXEC
|
Example
|
SEFOS# show logging
System Log Information
----------------------
Syslog logging : enabled(Number of messages 0)
Console logging : enabled(Number of messages 0)
TimeStamp option : enabled
Severity logging : Debugging
Log server IP : 10.0.0.1
Facility : Default (local0)
Buffered size : 100
LogBuffer(0 Entries, 0 bytes)
|
- logging - Enables syslog server and configures the syslog server IP address, the log-level and other syslog related parameter
- service timestamps - Enables timestamp option for logged messages
8.1.20 show email alerts
Displays configurations related to email alerts.
Mode
|
Privileged EXEC
|
Example
|
SEFOS# show email alerts
Sender email-id : syslog@sun.com
Receiver email-id : admin@sun.com
Mail server IP : 12.0.0.3
|
8.1.21 show syslog role
Displays the syslog role.
Mode
|
Privileged EXEC
|
Example
|
SEFOS# show syslog role
Syslog Role : Relay
|
syslog relay - Changes the syslog role from device to relay
8.1.22 show syslog mail
Displays the mail option in syslog.
Mode
|
Privileged EXEC
|
Example
|
SEFOS# show syslog mail
Syslog Mail Option : Enabled
|
8.1.23 show syslog localstorage
Displays the syslog localstorage.
Mode
|
Privileged EXEC
|
Example
|
SEFOS# show syslog localstorage
Syslog Localstorage : Enabled
|
syslog localstorage - Enables the syslog localstorage
8.1.24 show logging file
Displays the syslog file table.
Mode
|
Privileged EXEC
|
Example
|
SEFOS# show logging-file
Syslog File Table Information
----------------------------
Priority File-Name
-------- ----------
134 log1
134 log2
134 log3
|
- syslog filename-one/syslog filename-two/syslog filename-three - Gets the users desired file name to store syslog message
- logging-file - Adds an entry in to the file table
8.1.25 show logging-server
Displays the syslog logging-server table.
Mode
|
Privileged EXEC
|
Example
|
SEFOS# show logging-server
Syslog Forward Table Information
--------------------------------
Priority Address-Type IpAddress Port Trans-Type
-------- ------------ --------- ---- ----------
129 ipv4 12.0.0.2 514 udp
134 ipv4 12.0.0.1 514 udp
|
logging-server - Adds an entry into logging-server table
8.1.26 show mail-server
Displays the syslog mail-server table.
Mode
|
Privileged EXEC
|
Example
|
SEFOS# show mail-server
Syslog Mail Table Information
----------------------------
Priority Address-Type IpAddress Receiver Mail-Id
-------- ------------ --------- ----------------
134 ipv4 12.0.0.100 root@localhost
|
- mail-server - Adds an entry to mail-server table
8.1.27 show syslog relay-port
Displays the syslog relay-port.
Mode
|
Privileged EXEC
|
Example
|
SEFOS# show syslog relay-port
Syslog Port : 251
|
- syslog relay-port - Sets the syslog port through which it receives the syslog messages
- syslog relay - Changes the syslog role from device to relay
8.1.28 show syslog profile
Displays the syslog profile.
Mode
|
Privileged EXEC
|
Example
|
SEFOS# show syslog profile
Syslog Profile : raw
|
8.1.29 show syslog file-name
Displays the syslog local storage file name.
Mode
|
Privileged EXEC
|
Example
|
SEFOS# show syslog file-name
Syslog File Name
----------------------
Syslog File-One :log1
Syslog File-Two :log2
Syslog File-Three :log3
|
8.1.30 show syslog information
Displays the syslog information.
Mode
|
Privileged EXEC
|
Example
|
SEFOS# show syslog information
System Log Information
----------------------
Syslog Localstorage : Enabled
Syslog Mail Option : Enabled
Syslog Port : 251
Syslog Role : Relay
|

Sun Ethernet Fabric Operating System CLI Base Reference Manual
|
E26513-03
|
  
|
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.