Configuring SYSLOG

syslog is a standard for message logging, it's the mechanism through which messages generated by different containers are reported by the switch. These messages are reported in log files, or they can be sent to a remote syslog server.

Logging messages provide operational information about software components, including the status of the application, error reports, and detailed debugging data.

It's recommended not to set up more than 8 SYSLOG servers.

SYSLOG Servers

You can configure the logging of messages to a remote dedicated syslog server using the below command:

Reference

Command

[no] syslog add <ip4addr | ip6addr>

Description

Syslog server configuration

Parameters

IPv4 or v6 Address - Router IP

Mode

CONFIG

Example

pbnoscli(config)# syslog add 10.4.4.254
Syslog server 10.4.4.254 added to configuration
Restarting rsyslog-config service...
pbnoscli(config)#

pbnoscli(config)# syslog add 2401::1
Syslog server 2401::1 added to configuration
Restarting rsyslog-config service...
pbnoscli(config)# 

SYSLOG Severity configuration (Local and Remote)

You can configure the logging of messages to a remote dedicated syslog server. Syslog message whose priority is equal and higher than the configured numerical value (i.e. If the severity level "warning(4)" is set, syslog messages with severity levels of emergency(0), alert(1), critical(2), error(3), and warning(4) will be logged).

Reference

Command

logging level [alert | critical | debug | emergency | error | info | notice |

warning]

Description

alert Alert level

critical Critical level

debug Debug Level

emergency Emergency Level

error Error Level

info Informational Level

notice Notice Level

warning Warning Level

Parameters

Logging level

Mode

CONFIG

Command

no logging level

Description

enable all logging (default)

Parameters

None

Mode

CONFIG

Example

pbnoscli# configure terminal 
pbnoscli(config)# logging level 
  alert                 Alert level(1)
  critical              Critical level(2)
  debug                 Debug level(7)
  emergency             Emergency level(0)
  error                 Error level(3)
  info                  informational level(6)
  notice                Notice level(5)
  warning               Warning level(4)
pbnoscli(config)# logging level debug
pbnoscli(config)# 

You can verify the configuration by using the command(s) below:

pbnoscli# show syslog messages 
Sep 25 21:37:07.055105 opb-nos WARNING systemd[1]: snmp.service: Start request repeated too quickly.
Sep 25 21:37:07.055184 opb-nos WARNING systemd[1]: snmp.service: Failed with result 'start-limit-hit'.
Sep 25 21:37:07.055260 opb-nos ERR systemd[1]: Failed to start SNMP container.
Sep 25 21:37:07.056253 opb-nos WARNING systemd[1]: snmp.service: Start request repeated too quickly.
Sep 25 21:37:07.056342 opb-nos WARNING systemd[1]: snmp.service: Failed with result 'start-limit-hit'.
Sep 25 21:37:07.056416 opb-nos ERR systemd[1]: Failed to start SNMP container.
Sep 25 21:37:07.057744 opb-nos WARNING systemd[1]: snmp.service: Start request repeated too quickly.
Sep 25 21:37:07.057842 opb-nos WARNING systemd[1]: snmp.service: Failed with result 'start-limit-hit'.
Sep 25 21:37:07.057923 opb-nos ERR systemd[1]: Failed to start SNMP container.
Sep 25 21:37:07.564801 opb-nos WARNING systemd[1]: snmp.service: Start request repeated too quickly.
Sep 25 21:37:07.565078 opb-nos WARNING systemd[1]: snmp.service: Failed with result 'start-limit-hit'.
Sep 25 21:37:07.565278 opb-nos ERR systemd[1]: Failed to start SNMP container.
Sep 25 21:37:07.566579 opb-nos INFO systemd[1]: Stopping System Logging Service...
Sep 25 21:37:07.566723 opb-nos WARNING systemd[1]: snmp.service: Start request repeated too quickly.
Sep 25 21:37:07.566856 opb-nos WARNING systemd[1]: snmp.service: Failed with result 'start-limit-hit'.
<...>
Sep 25 21:38:47.838099 opb-nos ERR systemd[1]: Failed to start SNMP container.
pbnoscli# 
configure terminal
syslog add 10.4.4.254
syslog add 2401::1
logging level debug
!
interface mgmt
ip address 10.4.4.52/24 gateway 10.4.4.1
!
pbnoscli#