Syslog implementation overview

An event log can be configured to send events to one syslog destination. Syslog destinations have the following properties:

Because syslog uses eight severity levels whereas the router uses six internal severity levels, the severity levels are mapped to syslog severities. The following table describes the severity level mappings to syslog severities.

Table: Router to syslog severity level mappings
SR OS event severity Syslog severity numerical code Syslog severity name Syslog severity definition

0

emergency

System is unusable

critical (3)

1

alert

Action must be taken immediately

major (4)

2

critical

Critical conditions

minor (5)

3

error

Error conditions

warning (6)

4

warning

Warning conditions

5

notice

Normal but significant condition

cleared (1) indeterminate (2)

6

info

Informational messages

7

debug

Debug-level messages

The general format of an SR OS syslog message is as follows (see RFC 3164, The BSD Syslog Protocol):

<PRI> <HEADER><MSG>

Note: The ‟<” and ‟>” are informational delimiters to make reading and understanding the format easier and they do not appear in the actual syslog message except as part of the PRI.

where:

Examples (from different nodes)

default log-prefix (TMNX):

<188>Jan  2 18:43:23 10.221.38.108 TMNX: 17 Base SYSTEM-WARNING-tmnxStateChange-
2009 [CHASSIS]:  Status of Card 1 changed administrative state: inService, 
operational state: outOfService\n
<186>Jan  2 18:43:23 10.221.38.108 TMNX: 18 Base CHASSIS-MAJOR-tmnxEqCardRemoved-
2003 [Card 1]:  Class IO Module : removed\n

no log-prefix:

<188>Jan 11 18:48:12 10.221.38.108 : 32 Base SYSTEM-WARNING-tmnxStateChange-2009
[CHASSIS]:  Status of Card 1 changed administrative state: inService, 
operational state: outOfService\n
<186>Jan 11 18:48:12 10.221.38.108 : 33 Base CHASSIS-MAJOR-tmnxEqCardRemoved-
2003 [Card 1]:  Class IO Module : removed\n

log-prefix "test":

<186>Jan 11 18:51:22 10.221.38.108 test: 47 Base CHASSIS-MAJOR-tmnxEqCardRemoved-
2003 [Card 1]:  Class IO Module : removed\n
<188>Jan 11 18:51:22 10.221.38.108 test: 48 Base SYSTEM-WARNING-tmnxStateChange-
2009 [CHASSIS]:  Status of Card 1 changed administrative state: inService, 
operational state: outOfService\n