C H A P T E R  8

Feedback 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.

Related Commands

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.


mailserver ip-address


no mailserver


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.


Related Commands

8.1.3 sender mail-id

Sets the sender mail identifier. The no form of the command deletes the configured sender mail identifier.


sender mail-id 100


no sender mail-id


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.

Related Commands

8.1.4 receiver mail-id

Sets the receiver mail-id. The no form of the command deletes the configured receiver mail-id.


receiver mail-id 100


no 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.

Related Commands

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.


Related Commands

8.1.6 service timestamps

Enables timestamp option for logged messages. The no form of the command disables timestamp option for logged messages.


service timestamps


no service timestamps


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.

Related Commands

8.1.7 clear logs

Clears the system syslog buffers.


clear logs


Mode

Global Configuration Mode

Example

SEFOS(config)# clear logs


Related Commands

8.1.8 syslog mail

Enables the mail option in syslog. The no form of command disables the mail option in syslog.


syslog mail


no syslog mail


Mode

Global Configuration

Example

SEFOS(config)# syslog mail


Related Commands

8.1.9 syslog localstorage

Enables the syslog local storage. The no form of command disables the syslog local storage.


syslog localstorage


no syslog localstorage


Mode

Global Configuration

Example

SEFOS(config)# syslog localstorage


Related Commands

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.


Related Commands

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.


Related Commands

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.


Related Commands

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


no syslog relay-port


Mode

Global Configuration

Example

SEFOS(config)# syslog relay-port 500

Notes

Syslog relay must be enabled.


Related Commands

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.


Related Commands

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


Related Commands

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


Related Commands

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.


syslog relay


no syslog relay


Mode

Global Configuration

Example

SEFOS(config)# syslog relay


Related Commands

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.


Related Commands

8.1.19 show logging

Displays logging status and configuration information.


show logging


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)


Related Commands

8.1.20 show email alerts

Displays configurations related to email alerts.


show 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


Related Commands

8.1.21 show syslog role

Displays the syslog role.


show syslog role


Mode

Privileged EXEC

Example

SEFOS# show syslog role

 

Syslog Role : Relay


Related Commands

syslog relay - Changes the syslog role from device to relay

8.1.22 show syslog mail

Displays the mail option in syslog.


show syslog mail


Mode

Privileged EXEC

Example

SEFOS# show syslog mail

 

Syslog Mail Option : Enabled


Related Commands

8.1.23 show syslog localstorage

Displays the syslog localstorage.


show syslog localstorage


Mode

Privileged EXEC

Example

SEFOS# show syslog localstorage

 

Syslog Localstorage : Enabled


Related Commands

syslog localstorage - Enables the syslog localstorage

8.1.24 show logging file

Displays the syslog file table.


show logging-file


Mode

Privileged EXEC

Example

SEFOS# show logging-file

 

Syslog File Table Information

----------------------------

Priority File-Name

-------- ----------

134 log1

 

134 log2

 

134 log3


Related Commands

8.1.25 show logging-server

Displays the syslog logging-server table.


show logging-server


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

 


Related Commands

logging-server - Adds an entry into logging-server table

8.1.26 show mail-server

Displays the syslog mail-server table.


show mail-server


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


Related Commands

8.1.27 show syslog relay-port

Displays the syslog relay-port.


show syslog relay-port


Mode

Privileged EXEC

Example

SEFOS# show syslog relay-port

 

Syslog Port : 251


Related Commands

8.1.28 show syslog profile

Displays the syslog profile.


show 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.


show syslog 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


Related Commands

8.1.30 show syslog information

Displays the syslog information.


show 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


Related Commands

 

Feedback