Syslog
The nv unset
commands remove the configuration you set with the equivalent nv set
commands. This guide only describes an nv unset
command if it differs from the nv set
command.
nv set service syslog <vrf-id> server <server-id>
Configures the remote syslog
server.
Cumulus 5.13 and later does not provide this command. Use the nv set system syslog server <server-id>
command instead.
Command Syntax
Syntax | Description |
---|---|
<vrf-id> |
The VRF you want to configure. |
<server-id> |
The hostname or IP address of the syslog server. |
Version History
Introduced in Cumulus Linux 5.0.0
Example
cumulus@switch:~$ nv set service syslog default server 192.168.0.254
nv set service syslog <vrf-id> server <server-id> port
Configures the port number of the remote syslog
server.
Cumulus 5.13 and later does not provide this command. Use the nv set system syslog server <server-id> port
command instead.
Command Syntax
Syntax | Description |
---|---|
<vrf-id> |
The VRF you want to configure. |
<server-id> |
The hostname or IP address of the syslog server. |
Version History
Introduced in Cumulus Linux 5.0.0
Example
cumulus@switch:~$ nv set service syslog default server 192.168.0.254 port 601
nv set service syslog <vrf-id> server <server-id> protocol
Configures the protocol you want to use to transmit syslog data. You can specify either UDP or TCP.
Cumulus 5.13 and later does not provide this command. Use the nv set system syslog server <server-id> protocol
command instead.
Command Syntax
Syntax | Description |
---|---|
<vrf-id> |
The VRF you want to configure. |
<server-id> |
The hostname or IP address of the syslog server. |
Version History
Introduced in Cumulus Linux 5.0.0
Example
cumulus@switch:~$ nv set service syslog default server 192.168.0.254 protocol tcp
nv set system syslog format
Sets the log format. You can set the log format to:
- Standard (the default syslog format with a standard template).
- WELF (WebTrends Enhanced Log Format) and provide an optional firewall name.
Version History
Introduced in Cumulus Linux 5.13.0
Example
cumulus@switch:~$ nv set system syslog format welf firewall-name security-gateway
nv set system syslog selector <selector-id> facility
Sets a syslog filtering rule to group logs based on their source, such as auth
or cron
.
Command Syntax
Syntax | Description |
---|---|
<selector-id> |
The name of the filter selector. |
Version History
Introduced in Cumulus Linux 5.13.0
Example
cumulus@switch:~$ nv set system syslog selector SELECTOR1 facility cron
nv set system syslog selector <selector-id> filter <filter-id> action
Sets a syslog filtering rule action to filter logs that match a certain regular expression. You can specify include
or exclude
.
Command Syntax
Syntax | Description |
---|---|
<selector-id> |
The name of the filter selector. |
<filter-id> |
The filter ID. |
Version History
Introduced in Cumulus Linux 5.13.0
Example
cumulus@switch:~$ nv set system syslog selector SELECTOR2 filter 10 action exclude
nv set system syslog selector <selector-id> filter <filter-id> match
Sets a syslog filtering rule to filter logs that match a certain regular expression.
Command Syntax
Syntax | Description |
---|---|
<selector-id> |
The name of the filter selector. |
<filter-id> |
The filter ID. |
Version History
Introduced in Cumulus Linux 5.13.0
Example
cumulus@switch:~$ nv set system syslog selector SELECTOR2 filter 10 match .*Flush Journal.+$
nv set system syslog selector <selector-id> program-name
Sets a syslog filtering rule to filter logs based on the application that generates them.
Command Syntax
Syntax | Description |
---|---|
<selector-id> |
The name of the filter selector. |
Version History
Introduced in Cumulus Linux 5.13.0
Example
cumulus@switch:~$ nv set system syslog selector SELECTOR2 program-name switchd
nv set system syslog selector <selector-id> severity
Sets a syslog filtering rule to filter logs based on the severity level.
Command Syntax
Syntax | Description |
---|---|
<selector-id> |
The name of the filter selector. |
Version History
Introduced in Cumulus Linux 5.13.0
Example
cumulus@switch:~$ nv set system syslog selector SELECTOR2 severity debug
nv set system syslog server <server-id>
Configures the port of the remote syslog
server.
Cumulus 5.12 and earlier does not provide this command. Use the nv set service syslog <vrf-id> server <server-id>
command instead.
Command Syntax
Syntax | Description |
---|---|
<server-id> |
The hostname or IP address of the syslog server. |
Version History
Introduced in Cumulus Linux 5.13.0
Example
cumulus@switch:~$ nv set system syslog server 192.168.0.254
nv set system syslog server <server-id> port
Configures the port of the remote syslog
server.
Cumulus 5.12 and earlier does not provide this command. Use the nv set service syslog <vrf-id> server <server-id> port
command instead.
Command Syntax
Syntax | Description |
---|---|
<server-id> |
The hostname or IP address of the syslog server. |
Version History
Introduced in Cumulus Linux 5.13.0
Example
cumulus@switch:~$ nv set system syslog server 192.168.0.254 port 601
nv set system syslog server <server-id> protocol
Configures the protocol you want to use to transmit syslog data. You can specify either UDP or TCP.
Cumulus 5.12 and earlier does not provide this command. Use the nv set service syslog <vrf-id> server <server-id> protocol
command instead.
Command Syntax
Syntax | Description |
---|---|
<server-id> |
The hostname or IP address of the syslog server. |
Version History
Introduced in Cumulus Linux 5.13.0
Example
cumulus@switch:~$ nv set system syslog server 192.168.0.254 protocol tcp
nv set system syslog server <server-id> vrf <vrf-id>
Sets the VRF in which the syslog
server runs. By default, the syslog
server runs in the default VRF.
Command Syntax
Syntax | Description |
---|---|
<server-id> |
The hostname or IP address of the syslog server. |
<vrf-id> |
The VRF you want to configure. |
Version History
Introduced in Cumulus Linux 5.13.0
Example
cumulus@switch:~$ nv set system syslog server 192.168.0.254 vrf mgmt
nv set system syslog severity
Sets the global severity level of logs to debug
, info
, notice
, warn
, error
, critical
, or none
. The default setting is none
.
Version History
Introduced in Cumulus Linux 5.13.0
Example
cumulus@switch:~$ nv set system syslog severity notice