SYSLOG
SYSLOG
1. Function Overview
This product provides the SYSLOG functions shown below as a means to ascertain the operating state.
-
Functions to collect, reference, and delete the log that is accumulated inside this product
-
Functions for output to the console simultaneously with logging
-
Functions for transmitting to a previously-registered notification destination (SYSLOG server) simultaneously with logging
Logging, output to console, and notifications to the SYSLOG server are performed according to the output level specified by the user. Processing occurs only for the permitted messages.
Logging occurs in RAM, and is automatically backed up to flash ROM or can be backed up manually.
When backing up manually, you can also back up to an SD card at the same time.
Notifications to the SYSLOG server are done simultaneously with logging, but only if a SYSLOG server has been registered.
3. Function Details
The SYSLOG function is described below.
-
Logging occurs in RAM, and can accumulate up to 10,000 items.
Backup to Flash ROM can be performed by the following means.-
Automatic backup performed every hour since system boot
-
Manual backup performed by the save logging command
-
Backup performed when the write command is executed successfully
-
-
The accumulated logs can be viewed by the show logging command.
It can also be deleted by the clear logging command.
The show logging command shows the information in RAM.
The log information for this product is based on the premise that the information in RAM and flash ROM always matches.
(When the system starts, the log information in flash ROM is applied to RAM, and the service is started. The log information in RAM is not deleted following execution of a backup.) -
Log transmission occurs only if the notification destination (SYSLOG server) has been registered.
You can use the logging host command to register up to two notification destinations.
Specify the notification destination either by IP address or FQDN.
As the port number of the notification destination, the default port number 514 is used. (This setting cannot be freely set by the user.)
The logging facility command can be used to specify the facility value of log notifications. The factory default setting is local0(16).
The logging format command can be used to change the format of log notifications to not include the header portion (timestamp and hostname). The following are log examples.-
Without the format specified (no logging format)
<134>Jan 1 00:00:00 Yamaha [ IMI]:inf: Configuration file is saved in "config0"
-
With the format specified (logging format legacy)
<134>[ IMI]:inf: Configuration file is saved in "config0"
-
-
The level of log that is transmitted (SYSLOG priority) can be set using the logging trap command.
This product allows you to enable or disable output for each level of log.
With the factory settings, the output-level enables only Information and Error. -
The logging backup sd command enables SYSLOG backup to the SD card.
If SYSLOG backup to the SD card is enabled, executing the save logging command will save the dated log file to the SD card.
4. List of related commands
Related commands are indicated below.
For details, refer to the Command Reference.
Function name |
Command name |
Set log output level |
logging trap |
Set log console output |
logging stdout |
Set log notification destination (SYSLOG server) |
logging host |
Change the log notification format |
logging format |
Back up log |
save logging |
Clear log |
clear logging |
Show log |
show logging |
Set SD card backup of log |
logging backup sd |
Set the logging facility value |
logging facility |
5. Examples of Command Settings
-
Enable debug-level log output, and start log output to the SYSLOG server (192.168.1.100) with a facility value of 10.
Also output informational-level log to the console.Yamaha(config)# logging trap debug (1) Yamaha(config)# logging facility 10 (2) Yamaha(config)# logging host 192.168.1.100 (3) Yamaha(config)# logging stdout info (4)
1 Enable the debug-level log output 2 Set the facility value to 10 3 Register a SYSLOG server 4 Output an informational-level log to the console -
Stop notifications to the SYSLOG server.
Yamaha(config)# no logging host
-
Save and show the accumulated log information.
Yamaha# save logging (1) Yamaha# show logging (2) 2018/03/08 20:42:46: [ SESSION]:inf: Login succeeded as (noname) for HTTP: 192.168.1.40 2018/03/09 10:06:42: [ NSM]:inf: Interface port1.11 changed state to down 2018/03/09 10:09:48: [ SESSION]:inf: Logout timer expired as (noname) from HTTP: 192.168.1.40 2018/03/09 16:19:36: [ NSM]:inf: Interface port1.17 changed state to up :
1 Save the log in RAM to ROM 2 Show the accumulated logs -
Clear the accumulated log information.
Yamaha# clear logging (1) Yamaha# show logging (2) (3)
1 Clear all accumulated logs 2 Show the logs 3 Nothing is shown because they have been erased
6. Points of Caution
None