logging disk
system logging disk—Log event notification system log (syslog) messages to a file on the local device's hard disk. Logging to the disk, at a priority level of "information," is enabled by default. Log files are placed in the directory /var/log on the local device. They are readable by the "admin" user.
vManage Feature Template
For all Viptela devices:
Configuration ► Templates ► Logging
Command Hierarchy
system logging disk enable file rotate number size megabytes priority priority
Options
- Enable and Disable Logging to Disk
- enable
Allow syslog messages to be recorded in a file on the local hard disk. By default, logging to a local disk file is enabled. To disable disk logging, use the no system logging disk enable configuration command. - Log Files
- Syslog messages at or above the default or configured priority value are recorded in a number of files in the directory /var/log.
For Releases 15.4 and later, syslog messages are stored in the following files:
• auth.log—Login, logout, and superuser access events, and usage of authorization systems.
• kern.log—Kernel messages.
• messages—Consolidated log file that contains syslog messages from all sources.
• vconfd—All configuration-related messages.
• vdebug—All debug messages for modules whose debugging is turned on and all syslog messages above the configured priority value are saved to the file /var/log/vdebug and, in Releases 16.3 and later, in /var/log/tmplog/vdebug. Debug logging supports various levels of logging based on the module. Different modules implement the logging levels differently. For example, the system manager (sysmgr) has two logging levels (on and off), while the chassis manager (chmgr) has four different logging levels (off, low, normal, and high). You cannot send debug messages to a remote host. To enable debugging, use the debug operational command.
• vsyslog—All syslog messages above the configured priority value are stored in the file /var/log/vsyslog. The default priority value is "informational", so by default, all "notice", "warning", "error", "critical", "alert", and "emergency" syslog messages are saved.
For Releases 15.3 and earlier, syslog messages are stored in the following files:
• auth.log—Login, logout, and superuser access events, and usage of authorization systems.
• confd/audit.log—Captured by the audit daemon. These messages generally pertain to systemwide operations, users, files, and directories.
• confd/confd.log—Configuration messages.
• confd/devel.log—Development message.
• confd/netconf.log—Netconf messages.
• confd/snmp.log—SNMP messages.
• daemon.log—System and application process messages.
• devel.log—Developer messages.
• kern.log—Kernel messages.
• messages—Common log messages.
• quagga/daemon.log—One log file for each routing process running on the device. Examples are bgpd.log and ospfd.log
• quagga/quagga-debug.log—Routing process debug syslog messages.
• tallylog—Attempted and failed login operations.
• user.log—All user-level logs.
• vdebug—All debug messages for modules whose debugging is turned on and all syslog messages above the configured priority value are saved to the file /var/log/vdebug. Debug logging supports various levels of logging based on the module. Different modules implement the logging levels differently. For example, the system manager (sysmgr) has two logging levels (on and off), while the chassis manager (chmgr) has four different logging levels (off, low, normal, and high). You cannot send debug messages to a remote host. To enable debugging, use the debug operational command.
• vsyslog—All syslog messages above the configured priority value are stored in the file /var/log/vsyslog. The default priority value is "informational", so by default, all "notice", "warning", "error", "critical", "alert", and "emergency" syslog messages are saved.
• wtmp—Login records.
The Viptela software does not use the following standard LINUX files, which are present in /var/log, for logging: cron.log, debug, lpr.log, mail.log, and syslog. The files in the directory xml/ are not used for message logging. - Message Priority
- priority priority
Severity of the syslog message to save. The severity indicates the seriousness of the event that generated the message. The default priority value is "informational", so, by default, all syslog messages are recorded.
The priority level can be one of the following (in order of decreasing severity):
• Emergency—System is unusable (corresponds to syslog severity 0).
• Alert— Action must be taken immediately (corresponds to syslog severity 1).
• Critical—A serious condition (corresponds to syslog severity 2).
• Error—An error condition that does not fully impair system usability (corresponds to syslog severity 3).
• Warning—A minor error condition (corresponds to syslog severity 4).
• Notice—A normal, but significant condition (corresponds to syslog severity 5).
• Informational—Routine condition (the default) (corresponds to syslog severity 6). - Log File Rotation
- rotate number
size megabytes
Syslog files are rotated on an hourly basis based on the file's size. When the file size exceeds the configured value, the file is rotated, and the syslogd process isnotified. The default file size is 10 MB. You can configure this to be from 1 to 20 MB.
Syslog files are discarded after a certain number of files have been created. The default is 10. You can configure this to be from 1 to 10.
Debug files are also rotated and discarded following a similar scheme. However, you cannot configure the file size (10MB), nor can you configure the number of rotations (10).
Operational Commands
show logging—Display the system logging parameters that are in effect on the vEdge router:
file list /var/log—List the files in the /var/log directory.
file show /var/log/vsyslog—Display the contents of the vsyslog syslog file. Here is sample output for Releases 15.3 and earlier:
vSmart# file show /var/log/vsyslog Aug 5 17:00:04 vsmart vdaemon[937]: viptela_system_personality created/modified Aug 5 17:00:04 vsmart vdaemon[937]: viptela_config_security:549 Rekey generation interval 3600 (Seconds) Aug 5 17:00:04 vsmart SYSMGR[948]: %viptela-SYSMGR-6-200007: Confd Phase 2 UP Aug 5 17:00:04 vsmart vdaemon[937]: Message Connection UP
For Releases 15.3 and earlier, each syslog message generated by the Viptela software has this format:
% date - source - module - level - MessageID: text-of-syslog-message
In the third line of the /var/log/vsyslog output shown above, the message source is a vSmart controller, the module is SYSMGR (the system manager), the level is 6 (informational), the message ID is 200007, and the message itself is "Confd Phase 2 UP".
In Releases 15.4 and later, each syslog message has the following format:
facility.source& date - source - module - MessageID: text-of-syslog-message
Here is an example of a syslog message (in the file, this message would be on a single line):
local7.info: Dec 29 16:50:56 vedge DHCP_CLIENT[324]: %Viptela-vedge-DHCP_CLIENT-6-INFO-1300010: Renewed address 10.0.99.14/24 for interface mgmt0
Example
Change the syslog file size to 3 MB, save only three syslog files, and set the syslog priority to log only alert, and emergency conditions:
vEdge(config-system)# logging disk vEdge(config-disk)# file size 3 vEdge(config-disk)# file rotate 3 vEdge(config-disk)# priority alert vEdge(config-disk)# show configuration system logging disk file size 3 file rotate 3 priority alert ! ! !
Release Information
Command introduced in Viptela Software Release 14.1.
Files used to store syslog files changed in Release 15.4.
Starting with Release 16.3, debug output is placed in the /var/log/tmplog/vdebug file, not the /var/log/vdebug file.