Beginning in JUNOS Release 8.3, when the structured-data statement is included in the configuration for a log file, JUNOS processes and software libraries write messages to the file in structured-data format instead of the standard JUNOS format. For information about the structured-data statement, see Logging Messages in Structured-Data Format.
Structured-format makes it easier for automated applications to extract information from the message. In particular, the standardized format for reporting the value of variables (elements in the English-language message that vary depending on the circumstances that triggered the message) makes it easy for an application to extract those values. In standard format, the variables are interspersed in the message text and not identified as variables.
The structured-data format for a message includes the following fields (which appear here on two lines only for legibility):
-
<priority code>version timestamp hostname
process processID TAG [junos@2636.platform variable-value-pairs] message-text
Table 19 describes the fields. If the system logging utility cannot determine the value in a particular field, a hyphen ( - ) appears instead.
Table 19: Fields in Structured-Data Messages
| Field | Description | Examples |
|---|---|---|
|
<priority code> |
Number that indicates the message’s facility and severity. It is calculated by multiplying the facility number by 8 and then adding the numerical value of the severity. For a mapping of the numerical codes to facility and severity, see Table 20. |
|
|
version |
Version of the Internet Engineering Task Force (IETF) system logging protocol specification. |
|
|
timestamp |
Time when the message was generated, in one of two representations:
|
|
|
hostname |
Name of the host that originally generated the message. |
|
|
process |
Name of the JUNOS process that generated the message. |
|
|
processID |
UNIX process ID (PID) of the JUNOS process that generated the message. |
|
|
TAG |
JUNOS system log message tag, which uniquely identifies the message. For a list of the tags described in this reference, see System Log Messages. |
|
|
An identifier for the type of hardware platform that generated the message. The junos@2636 prefix indicates that the platform runs the JUNOS software. It is followed by a dot-separated numerical identifier for the platform type. For a list of the identifiers, see Table 21 |
|
|
|
variable-value-pairs |
A variable-value pair for each element in the message-text string that varies depending on the circumstances that triggered the message. Each pair appears in the format variable="value". |
|
|
message-text |
English-language description of the event or error (omitted if the brief statement is included at the [edit system syslog file filename structured-data] hierarchy level). For the text for each message, see the chapters following System Log Messages |
|
By default, the structured-data version of a message includes English text at the end, as in the following example (which appears on multiple lines only for legibility):
- <165>1 2007-02-15T09:17:15.719Z router1 mgd 3046 UI_DBASE_LOGOUT_EVENT
[junos@2636.1.1.1.2.18 username="regress"] User 'regress' exiting configuration mode
When the brief statement is included at the [edit system syslog file filename structured-data] hierarchy level, the English text is omitted, as in this example:
- <165>1 2007-02-15T09:17:15.719Z router1 mgd 3046 UI_DBASE_LOGOUT_EVENT
[junos@2636.1.1.1.2.18 username="regress"]
Table 20 maps the codes that appear in the priority-code field to facility and severity level
![]() |
Note: Not all of the facilities and severities listed in Table 20can be included in statements at the [edit system syslog] hierarchy level (some are used by internal processes). For a list of the facilities and severity levels that can be included in the configuration, see Specifying the Facility and Severity of Messages to Include in the Log. |
Table 20: Facility and Severity Codes in the priority-code Field
Table 21 lists the numerical identifiers for routing platforms that appear in the platform field. The identifier is derived from the platform’s SNMP object identifier (OID) as defined in the Juniper Networks routing platform MIB. For more information about OIDs, see the JUNOS Network Management Configuration Guide. For a downloadable version of the MIB, see http://www.juniper.net/techpubs/\ software/junos/junosXX/swconfigXX-net-mgmt/html/mib-jnx-chas-defines.txt (replace XX with a release code such as 84 for JUNOS Release 8.4).
Table 21: Platform Identifiers in the platform Field