Local and Remote Logging
logging local <log-level> Sets the minimum severity of log messages to be saved in log files on local persistent storage. |
||
Syntax Description |
log-level |
|
Default |
info |
|
Configuration Mode |
config |
|
History |
1.5 |
|
Example |
|
|
Related Commands |
show logging |
|
Notes |
|
logging local override [class <class> priority <log-level>] Enables class-specific overrides to the local log level. |
||
Syntax Description |
override |
Enables class-specific overrides to the local log level |
class |
Sets or removes a per-class override on the logging level. All classes which do not have an override set will use the global logging level set with "logging local <log level>". Classes that do have an override will do as the override specifies. If "none" is specified for the log level, MLNX-OS will not log anything from this class.
|
|
log-level |
|
|
Default |
Override disabled |
|
Configuration Mode |
config |
|
History |
1.5 |
|
Example |
|
|
Related Commands |
show logging |
|
Notes |
logging <syslog-ip-address> [trap {<log-level> | override class <class> priority <log-level>}] Enables (by setting the IP address) sending logging messages, with ability to filter the logging messages according to their classes. |
||
Syntax Description |
syslog-ip-address |
IPv4 address of the remote syslog server |
class |
Sets or removes a per-class override on the logging level. All classes which do not have an override set will use the global logging level set with "logging local <log level>". Classes that do have an override will do as the override specifies. If "none" is specified for the log level, MLNX-OS will not log anything from this class.
|
|
log-level |
|
|
Default |
Remote logging is disabled |
|
Configuration Mode |
config |
|
History |
1.5 |
|
Example |
|
|
Related Commands |
show logging |
|
Notes |
logging receive Enables receiving logging messages from a remote host. |
||
Syntax Description |
N/A |
|
Default |
Disabled |
|
Configuration Mode |
config |
|
History |
1.5 |
|
Example |
|
|
Related Commands |
show logging |
|
Notes |
|
logging format {standard | welf [fw-name <hostname>]} Sets the format of the logging messages. |
||
Syntax Description |
standard |
Standard format |
welf |
WebTrends Enhanced Log file (WELF) format |
|
fw-name |
Specifies the firewall hostname that should be associated with each message logged in WELF format. If no firewall name is set, the hostname is used by default |
|
Default |
Standard |
|
Configuration Mode |
config |
|
History |
1.5 |
|
Example |
|
|
Related Commands |
show logging |
|
Notes |
logging fields seconds {enable | fractional-digits <f-digit> | whole-digits <w-digit>} Specifies whether to include an additional field in each log message that shows the number of seconds since the Epoch or not. |
||
Syntax Description |
enable |
Specifies whether to include an additional field in each log message that shows the number of seconds since the Epoch or not |
fractional-digits |
The fractional-digits parameter controls the number of digits to the right of the decimal point. Truncation is done from the right. |
|
whole-digits |
The whole-digits parameter controls the number of digits to the left of the decimal point. Truncation is done from the left. Except for the year, all of these digits are redundant with syslog's own date and time. |
|
Default |
Disabled |
|
Configuration Mode |
config |
|
History |
1.5 |
|
Example |
|
|
Related Commands |
show logging |
|
Notes |
This is independent of the standard syslog date and time at the beginning of each message in the format of "July 15 18:00:00". Aside from indicating the year at full precision, its main purpose is to provide subsecond precision. |
logging level {cli commands <log-level> | audit mgmt <log-level>} Sets the severity level at which CLI commands or the management audit message that the user executes are logged. This includes auditing of both configuration changes and actions. |
||
Syntax Description |
cli commands |
Sets the severity level at which CLI commands which the user executes are logged |
audit mgmt |
Sets the severity level at which all network management audit messages are logged |
|
log-level |
|
|
Default |
CLI commands and audit message are set to notice logging level |
|
Configuration Mode |
config |
|
History |
1.5 |
|
Example |
|
|
Related Commands |
show logging |
|
Notes |
logging files delete {current | oldest [<number-of-files>]} Deletes the current or oldest log files. |
||
Syntax Description |
current |
Deletes current log file |
oldest |
Deletes oldest log file |
|
number-of-files |
Sets the number of files to be deleted |
|
Default |
N/A |
|
Configuration Mode |
config |
|
History |
1.5 |
|
Example |
|
|
Related Commands |
show logging |
|
Notes |
logging files rotation {criteria { frequency <freq> | size <size-mb>| size-pct <size-percentage>} | force | max-number <number-of-files>} Sets the rotation criteria of the logging files. |
||
Syntax Description |
frequency |
Sets rotation criteria according to time. Possible options: Daily, Weekly, Monthly |
size |
Sets rotation criteria according to size in megabytes. Range: 1-9999. |
|
size-pct |
Sets rotation criteria according to size in percentage of the partition where the logging files are kept in. The percentage given is truncated to three decimal points (thousandths of a percent). |
|
force |
Forces an immediate rotation of the log files. This does not affect the schedule of auto-rotation if it was done based on time: the next automatic rotation will still occur at the same time for which it was previously scheduled. Naturally, if the auto-rotation was based on size, this will delay it somewhat as it reduces the size of the active log file to zero. |
|
max-number |
The number of log files will be kept. If the number of log files ever exceeds this number (either at rotation time, or when this setting is lowered), the system will delete as many files as necessary to bring it down to this number, starting with the oldest. |
|
Default |
10 files are kept by default with rotation criteria of 5% of the log partition size |
|
Configuration Mode |
config |
|
History |
1.5 |
|
Example |
|
|
Related Commands |
show logging |
|
Notes |
logging files upload {current | <file-number>} <url> Uploads a log file to a remote host. |
||
Syntax Description |
current |
The current log file. The current log file will have the filename "messages" if you do not specify a new name for it in the upload URL. |
file-number |
An archived log file. The archived log file will have the name “messages<n>.gz” (while “n” is the file number) if you do not specify a new name for it in the upload URL. The file will be compressed with gzip. |
|
url |
Uploads URL path. FTP, TFTP, SCP, and SFTP are supported. Example: scp://username[:password]@hostname/path/filename. |
|
Default |
N/A |
|
Configuration Mode |
config |
|
History |
1.5 |
|
Example |
|
|
Related Commands |
show logging |
|
Notes |
show logging Displays the logging configurations. |
||
Syntax Description |
N/A |
|
Default |
N/A |
|
Configuration Mode |
Any configuration mode |
|
History |
1.5 |
|
Example |
|
|
Related Commands |
logging fields |
|
Notes |
show log [continues | files [<file-number>] ] [ [not] matching <reg-exp>] Displays the log file with optional filter criteria. |
||
Syntax Description |
continues |
Displays the last few lines of the current log file and then continues to display new lines as they come in until the user hits Ctrl+C, similar to LINUX "tail" utility |
files |
Displays the list of log files |
|
file-number |
Displays an archived log file, where the number may range from 1 up to the number of archived log files available |
|
[not] matching <reg-exp> |
The file is piped through a LINUX "grep" utility to only include lines either matching, or not matching, the provided regular expression |
|
Default |
N/A |
|
Configuration Mode |
Any configuration mode |
|
History |
1.5 |
|
Example |
|
|
Related Commands |
logging fields |
|
Notes |