[an error occurred while processing this directive][an error occurred while processing this directive]

Including Priority Information in System Log Messages

A message’s facility and severity level are together referred to as its priority. By default, messages logged in the standard JUNOS format do not include information about priority. To include priority information in standard-format messages directed to a file, include the explicit-priority statement at the [edit system syslog file filename] hierarchy level:

[edit system syslog file filename]
facility severity;
explicit-priority;

Note: Messages logged in structured-data format include priority information by default (structured-data format is available in JUNOS Release 8.3 and later and for file destinations only). If you include the structured-data statement at the [edit system syslog file filename] hierarchy level along with the explicit-priority statement, the explicit-priority statement is ignored and messages are logged in structured-data format.

For information about the structured-data statement, see Logging Messages in Structured-Data Format. For information about the contents of a structured-data message, see Displaying a Log File from a Single-Chassis System.

To include priority information in messages directed to a remote machine or the other Routing Engine, include the explicit-priority statement at the [edit system syslog host (hostname | other-routing-engine)] hierarchy level:

[edit system syslog host (hostname | other-routing-engine)]
facility severity;
explicit-priority;

The priority recorded in a message always indicates the original, local facility name. If the facility-override statement is included for messages directed to a remote destination, the JUNOS system logging utility still uses the alternative facility for the messages themselves when directing them to the remote destination. For more information about alternative facilities, see Changing the Alternative Facility Name for Remote Messages.

When the explicit-priority statement is included, the JUNOS logging utility prepends codes for the facility name and severity level to the message tag name, if the message has one:

FACILITY-severity[-TAG]

(The tag is a unique identifier assigned to some JUNOS system log messages; for more information, see Interpreting Messages Generated in Structured-Data Format, Interpreting Messages Generated in Standard Format by Services on a PIC, Interpreting Messages Generated in Standard Format by a JUNOS Process or Library, and Displaying and Interpreting System Log Message Descriptions.)

Table 1 lists the facility codes that can appear in system log messages and maps them to facility names.

Note: If the second column in Table 1 does not include the JUNOS facility name for a code, the facility cannot be included in a statement at the [edit system syslog] hierarchy level. The JUNOS Software might use the facilities in Table 1— and others that are not listed—when reporting on internal operations

Table 1: Facility Codes Reported in Priority Information

CodeJUNOS Facility NameType of Event or Error

AUTH

authorization

Authentication and authorization attempts

AUTHPRIV

 

Authentication and authorization attempts that can be viewed by superusers only

CHANGE

change-log

Changes to the JUNOS configuration

CONFLICT

conflict-log

Specified configuration is invalid on the routing platform type

CONSOLE

 

Messages written to /dev/console by the kernel console output driver

CRON

 

Actions performed or errors encountered by the cron process

DAEMON

daemon

Actions performed or errors encountered by system processes

DFC

dfc

Actions performed or errors encountered by the dynamic flow capture process

FIREWALL

firewall

Packet filtering actions performed by a firewall filter

FTP

ftp

Actions performed or errors encountered by the FTP process

INTERACT

interactive-commands

Commands issued at the JUNOS CLI prompt or invoked by a client application such as a JUNOScript or NETCONF client

KERN

kernel

Actions performed or errors encountered by the JUNOS kernel

NTP

 

Actions performed or errors encountered by the Network Time Protocol (NTP) process

PFE

pfe

Actions performed or errors encountered by the Packet Forwarding Engine

SYSLOG

Actions performed or errors encountered by the JUNOS system logging utility

USER

user

Actions performed or errors encountered by user-space processes

Table 2 lists the numerical severity codes that can appear in system log messages and maps them to severity levels.

Table 2: Numerical Codes for Severity Levels Reported in Priority Information

Numerical CodeSeverity LevelDescription

0

emergency

System panic or other condition that causes the routing platform to stop functioning

1

alert

Conditions that require immediate correction, such as a corrupted system database

2

critical

Critical conditions, such as hard drive errors

3

error

Error conditions that generally have less serious consequences than errors in the emergency, alert, and critical levels

4

warning

Conditions that warrant monitoring

5

notice

Conditions that are not errors but might warrant special handling

6

info

Events or nonerror conditions of interest

7

debug

Software debugging messages (these appear only if a technical support representative has instructed you to configure this severity level)

In the following example, the CHASSISD_PARSE_COMPLETE message belongs to the daemon facility and is assigned severity info (6):

Aug 21 12:36:30 router1 chassisd[522]:%DAEMON-6-CHASSISD_PARSE_COMPLETE: Using new configuration

When the explicit-priority statement is not included, the priority does not appear in the message:

Aug 21 12:36:30 router1 chassisd[522]: CHASSISD_PARSE_COMPLETE: Using new configuration

For more information about message formatting, see Displaying and Interpreting System Log Message Descriptions.


Published: 2010-04-28

[an error occurred while processing this directive]