Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

System Logging for a TX Matrix or TX Matrix Plus Router

Configuring System Logging for a TX Matrix Router

To configure system logging for all routers in a routing matrix composed of a TX Matrix router and T640 routers, include the syslog statement at the [edit system] hierarchy level on the TX Matrix router. The syslog statement applies to every router in the routing matrix.

When included in the configuration on the TX Matrix router, the following configuration statements have the same effect as on a single-chassis system, except that they apply to every router in the routing matrix:

The effect of the other statements differs somewhat for a routing matrix than for a single-chassis system.

Configuring System Logging for a TX Matrix Plus Router

From the perspective of the user interface, the routing matrix appears as a single router. The TX Matrix Plus router (also called the switch-fabric chassis SFC) controls all the T1600 or T4000 routers (also called the line-card chassis LCC) in the routing matrix.

To configure system logging for all routers in a routing matrix composed of a TX Matrix Plus router with connected T1600 or T4000 LCCs, include the syslog statement at the [edit system] hierarchy level on the SFC. The syslog statement applies to every router in the routing matrix.

When included in the configuration on the TX Matrix Plus router, the following configuration statements have the same effect as on a single-chassis system, except that they apply to every router in the routing matrix.

The effect of the other statements differs somewhat for a routing matrix than for a single-chassis system.

Configuring Message Forwarding to the TX Matrix Router

By default, the primary Routing Engine on each T640 router forwards to the primary Routing Engine on the TX Matrix router all messages from all facilities with severity level of info and higher. To change the facility, the severity level, or both, include the host scc-master statement at the [edit system syslog] hierarchy level on the TX Matrix router:

To disable message forwarding, set the facility to any and the severity level to none:

In either case, the setting applies to all T640 routers in the routing matrix.

To capture the messages forwarded by the T640 routers (as well as messages generated on the TX Matrix router itself), you must also configure system logging on the TX Matrix router. Direct the messages to one or more destinations by including the appropriate statements at the [edit system syslog] hierarchy level on the TX Matrix router:

As previously noted, the configuration statements included on the TX Matrix router also configure the same destinations on each T640 router in the routing matrix.

When specifying the severity level for local messages (at the [edit system syslog (file | host | console | user)] hierarchy level) and forwarded messages (at the [edit system syslog host scc-master] hierarchy level), you can set the same severity level for both, set a lower severity level for local messages, or set a higher severity level for local messages. The following examples describe the consequence of each configuration. (For simplicity, the examples use the any facility in every case. You can also specify different severities for different facilities, with more complex consequences.)

Configuring Message Forwarding to the TX Matrix Plus Router

From the perspective of the user interface, the routing matrix appears as a single router. The TX Matrix Plus router (also called the switch-fabric chassis SFC) controls all the T1600 or T4000 routers (also called the line-card chassis LCC) in the routing matrix.

By default, the primary Routing Engine on each connected T1600 or T4000 LCC forwards to the primary Routing Engine on the SFC all messages from all facilities with severity level of info and higher. To change the facility, the severity level, or both, include the host sfc0-master statement at the [edit system syslog] hierarchy level on the SFC:

To disable message forwarding, set the facility to any and the severity level to none:

In either case, the setting applies to all connected LCCs in the routing matrix.

To capture the messages forwarded by the T1600 or T4000 LCCs (as well as messages generated on the SFC itself), you must also configure system logging on the SFC. Direct the messages to one or more destinations by including the appropriate statements at the [edit system syslog] hierarchy level on the SFC:

As previously noted, the configuration statements included on the SFC also configure the same destinations on each connected LCC.

When specifying the severity level for local messages (at the [edit system syslog (file | host | console | user)] hierarchy level) and forwarded messages (at the [edit system syslog host sfc0-master] hierarchy level), you can set the same severity level for both, set a lower severity level for local messages, or set a higher severity level for local messages. The following examples describe the consequence of each configuration. (For simplicity, the examples use the any facility in every case. You can also specify different severities for different facilities, with more complex consequences.)

Impact of Different Local and Forwarded Severity Levels on System Log Messages on a TX Matrix Router

This topic describes the impact of different local and forwarded severity levels configured for system log messages on a TX Matrix router:

Messages Logged When the Local and Forwarded Severity Levels Are the Same

When the severity level is the same for local and forwarded messages, the log on the TX Matrix router contains all messages from the logs on the T640 routers. For example, you can specify severity info for the /var/log/messages file, which is the default severity level for messages forwarded by T640 routers:

Table 1 specifies which messages are included in the logs on the T640 routers and the TX Matrix router.

Table 1: Example: Local and Forwarded Severity Level Are Both info

Log Location

Source of Messages

Lowest Severity Included

T640 router

Local

info

TX Matrix router

Local

info

Forwarded from T640 routers

info

Messages Logged When the Local Severity Level Is Lower

When the severity level is lower for local messages than for forwarded messages, the log on the TX Matrix router includes fewer forwarded messages than when the severities are the same. Locally generated messages are still logged at the lower severity level, so their number in each log is the same as when the severities are the same.

For example, on a TX Matrix router, you can specify severity notice for the /var/log/messages file and severity critical for forwarded messages:

Table 2 specifies which messages in a routing matrix are included in the logs on the T640 routers and the TX Matrix router. The T640 routers forward only those messages with severity critical and higher, so the log on the TX Matrix router does not include the messages with severity error, warning, or notice that the T640 routers log locally.

Table 2: Example: Local Severity Is notice, Forwarded Severity Is critical

Log Location

Source of Messages

Lowest Severity Included

T640 router

Local

notice

TX Matrix router

Local

notice

Forwarded from T640 routers

critical

Messages Logged When the Local Severity Level Is Higher

When the severity level is higher for local messages than for forwarded messages, the log on the TX Matrix router includes fewer forwarded messages than when the severities are the same, and all local logs contain fewer messages overall.

For example, you can specify severity critical for the /var/log/messages file and severity notice for forwarded messages:

Table 3 specifies which messages are included in the logs on the T640 routers and the TX Matrix router. Although the T640 routers forward messages with severity notice and higher, the TX Matrix router discards any of those messages with severity lower than critical (does not log forwarded messages with severity error, warning, or notice). None of the logs include messages with severity error or lower.

Table 3: Example: Local Severity Is critical, Forwarded Severity Is notice

Log Location

Source of Messages

Lowest Severity Included

T640 router

Local

critical

TX Matrix router

Local

critical

Forwarded from T640 routers

critical

Impact of Different Local and Forwarded Severity Levels on System Log Messages on a TX Matrix Plus Router

This topic describes the impact of different local and forwarded severity levels configured for the system log messages on a TX Matrix Plus router:

Messages Logged When the Local and Forwarded Severity Levels Are the Same

When the severity level is the same for local and forwarded messages, the log on the TX Matrix Plus router contains all messages from the logs on the T1600 routers in the routing matrix. For example, you can specify severity info for the /var/log/messages file, which is the default severity level for messages forwarded by T1600 routers:

Table 4 specifies which messages in a routing matrix based on a TX Matrix Plus router are included in the logs on the T1600 routers and the TX Matrix Plus router:

Table 4: Example: Local and Forwarded Severity Level Are Both info

Log Location

Source of Messages

Lowest Severity Included

T1600 router

Local

info

TX Matrix Plus router

Local

info

Forwarded from T1600 routers

info

Messages Logged When the Local Severity Level Is Lower

When the severity level is lower for local messages than for forwarded messages, the log on the TX Matrix Plus router includes fewer forwarded messages than when the severities are the same. Locally generated messages are still logged at the lower severity level, so their number in each log is the same as when the severities are the same.

For example, on a TX Matrix Plus router, you can specify severity notice for the /var/log/messages file and severity critical for forwarded messages:

Table 5 specifies which messages in a routing matrix are included in the logs on the T1600 routers and the TX Matrix Plus router. The T1600 routers forward only those messages with severity critical and higher, so the log on the TX Matrix Plus router does not include the messages with severity error, warning, or notice that the T1600 routers log locally.

Table 5: Example: Local Severity Is notice, Forwarded Severity Is critical

Log Location

Source of Messages

Lowest Severity Included

T1600 router

Local

notice

TX Matrix Plus router

Local

notice

Forwarded from T1600 routers

critical

Messages Logged When the Local Severity Level Is Higher

When the severity level is higher for local messages than for forwarded messages, the log on the TX Matrix Plus router includes fewer forwarded messages than when the severities are the same, and all local logs contain fewer messages overall.

For example, you can specify severity critical for the /var/log/messages file and severity notice for forwarded messages:

Table 6 specifies which messages are included in the logs on the T1600 routers and the TX Matrix Plus router. Although the T1600 routers forward messages with severity notice and higher, the TX Matrix Plus router discards any of those messages with severity lower than critical (does not log forwarded messages with severity error, warning, or notice). None of the logs include messages with severity error or lower.

Table 6: Example: Local Severity Is critical, Forwarded Severity Is notice

Log Location

Source of Messages

Lowest Severity Included

T1600 router

Local

critical

TX Matrix Plus router

Local

critical

Forwarded from T1600 routers

critical

Configuring Optional Features for Forwarded Messages on a TX Matrix Router

To configure additional optional features when specifying how the T640 routers forward messages to the TX Matrix router, include statements at the [edit system syslog host scc-master] hierarchy level. To include priority information (facility and severity level) in each forwarded message, include the explicit-priority statement. To insert a text string in each forwarded message, include the log-prefix statement. To use regular expression matching to specify more exactly which messages from a facility are forwarded, include the match statement.

You can also include the facility-override statement at the [edit system syslog host scc-master] hierarchy level, but we do not recommend doing so. It is not necessary to use alternative facilities for messages forwarded to the TX Matrix router, because it runs the Junos system logging utility and can interpret the Junos OS-specific facilities. For more information about alternative facilities, see Changing the Alternative Facility Name for System Log Messages Directed to a Remote Destination.

Including Priority Information in Forwarded Messages

When you include the explicit-priority statement at the [edit system syslog host scc-master] hierarchy level, messages forwarded to the TX Matrix router include priority information. For the information to appear in a log file on the TX Matrix router, you must also include the explicit-priority statement at the [edit system syslog file filename] hierarchy level for the file on the TX Matrix router. As a consequence, the log file with the same name on each platform in the routing matrix also includes priority information for locally generated messages.

To include priority information in messages directed to a remote machine from all routers in the routing matrix, also include the explicit-priority statement at the [edit system syslog host hostname] hierarchy level for the remote machine. For more information, see Directing Messages to a Remote Destination from the Routing Matrix Based on the TX Matrix Router.

In the following example, the /var/log/messages file on all routers includes priority information for messages with severity notice and higher from all facilities. The log on the TX Matrix router also includes messages with those characteristics forwarded from the T640 routers.

Adding a Text String to Forwarded Messages

When you include the log-prefix statement at the [edit system syslog host scc-master] hierarchy level, the string that you define appears in every message forwarded to the TX Matrix router. For more information, see Adding a Text String to System Log Messages Directed to a Remote Destination.

Using Regular Expressions to Refine the Set of Forwarded Messages

When you include the match statement at the [edit system syslog host scc-master] hierarchy level, the regular expression that you specify controls which messages from the T640 routers are forwarded to the TX Matrix router. The regular expression is not applied to messages from the T640 router that are directed to destinations other than the TX Matrix router. For more information about regular expression matching, see Using Strings and Regular Expressions to Refine the Set of Logged Messages.

Configuring Optional Features for Forwarded Messages on a TX Matrix Plus Router

From the perspective of the user interface, the routing matrix appears as a single router. The TX Matrix Plus router (also called the switch-fabric chassis SFC) controls all the T1600 or T4000 routers (also called the line-card chassis LCC) in the routing matrix.

To configure additional optional features when specifying how the connected T1600 or T4000 LCCs forward messages to the SFC, include statements at the [edit system syslog host sfc0-master] hierarchy level. To include priority information (facility and severity level) in each forwarded message, include the explicit-priority statement. To insert a text string in each forwarded message, include the log-prefix statement. To use regular expression matching to specify more exactly which messages from a facility are forwarded, include the match statement.

You can also include the facility-override statement at the [edit system syslog host sfc0-master] hierarchy level, but we do not recommend doing so. It is not necessary to use alternative facilities for messages forwarded to the SFC, because it runs the Junos system logging utility and can interpret the Junos OS-specific facilities. For more information about alternative facilities, see Changing the Alternative Facility Name for System Log Messages Directed to a Remote Destination.

Including Priority Information in Forwarded Messages

When you include the explicit-priority statement at the [edit system syslog host sfc0-master] hierarchy level, messages forwarded to the TX Matrix Plus router (or the SFC) include priority information. For the information to appear in a log file on the SFC, you must also include the explicit-priority statement at the [edit system syslog file filename] hierarchy level for the file on the SFC. As a consequence, the log file with the same name on each platform in the routing matrix also includes priority information for locally generated messages.

To include priority information in messages directed to a remote machine from all routers in the routing matrix, also include the explicit-priority statement at the [edit system syslog host hostname] hierarchy level for the remote machine. For more information, see Directing Messages to a Remote Destination from the Routing Matrix Based on a TX Matrix Plus Router.

In the following example, the /var/log/messages file on all routers includes priority information for messages with severity notice and higher from all facilities. The log on the TX Matrix Plus router SFC also includes messages with those characteristics forwarded from the connected T1600 or T4000 LCCs.

Adding a Text String to Forwarded Messages

When you include the log-prefix statement at the [edit system syslog host sfc0-master] hierarchy level, the string that you define appears in every message forwarded to the TX Matrix Plus router. For more information, see Adding a Text String to System Log Messages Directed to a Remote Destination.

Using Regular Expressions to Refine the Set of Forwarded Messages

When you include the match statement at the [edit system syslog host sfc0-master] hierarchy level, the regular expression that you specify controls which messages from the connected T1600 or T4000 LCCs are forwarded to the TX Matrix Plus SFC. The regular expression is not applied to messages from the connected LCCs that are directed to destinations other than the SFC. For more information about regular expression matching, see Using Strings and Regular Expressions to Refine the Set of Logged Messages.

Configuring System Logging Differently on Each T640 Router in a Routing Matrix

We recommend that all routers in a routing matrix composed of a TX Matrix router and T640 routers use the same configuration, which implies that you include system logging configuration statements on the TX Matrix router only. In rare circumstances, however, you might choose to log different messages on different routers. For example, if one router in the routing matrix is experiencing problems with authentication, a Juniper Networks support representative might instruct you to log messages from the authorization facility with severity debug on that router.

To configure routers separately, include configuration statements in the appropriate groups at the [edit groups] hierarchy level on the TX Matrix router:

  • To configure settings that apply to the TX Matrix router but not the T640 routers, include them in the re0 and re1 configuration groups.

  • To configure settings that apply to particular T640 routers, include them in the lccn-re0 and lccn-re1 configuration groups, where n is the line-card chassis (LCC) index number of the router.

When you use configuration groups, do not issue CLI configuration-mode commands to change statements at the [edit system syslog] hierarchy level on the TX Matrix router. If you do, the resulting statements overwrite the statements defined in configuration groups and apply to the T640 routers also. (We further recommend that you do not issue CLI configuration-mode commands on the T640 routers at any time.)

The following example shows how to configure the /var/log/messages files on three routers to include different sets of messages:

  • On the TX Matrix router, local messages with severity info and higher from all facilities. The file does not include messages from the T640 routers, because the host scc-master statement disables message forwarding.

  • On the T640 router designated LCC0, messages from the authorization facility with severity info and higher.

  • On the T640 router designated LCC1, messages with severity notice from all facilities.

Configuring System Logging Differently on Each T1600 or T4000 Router in a Routing Matrix

We recommend that all routers in a routing matrix composed of a TX Matrix Plus router with T1600 or T4000 routers use the same configuration, which implies that you include system logging configuration statements on the TX Matrix Plus router only. In rare circumstances, however, you might choose to log different messages on different routers. For example, if one router in the routing matrix is experiencing problems with authentication, a Juniper Networks support representative might instruct you to log messages from the authorization facility with severity debug on that router.

To configure routers separately, include configuration statements in the appropriate groups at the [edit groups] hierarchy level on the TX Matrix Plus router:

  • To configure settings that apply to the TX Matrix Plus router but not the T1600 or T4000 routers, include them in the re0 and re1 configuration groups.

  • To configure settings that apply to particular T1600 or T4000 routers, include them in the lccn-re0 and lccn-re1 configuration groups, where n is the line-card chassis (LCC) index number of the router.

When you use configuration groups, do not issue CLI configuration-mode commands to change statements at the [edit system syslog] hierarchy level on the TX Matrix Plus router. If you do, the resulting statements overwrite the statements defined in configuration groups and apply to the T1600 or T4000 routers also. (We further recommend that you do not issue CLI configuration-mode commands on the T1600 or T4000 routers at any time.)

For more information about the configuration groups for a routing matrix, see the chapter about configuration groups in the Junos OS CLI User Guide .

The following example shows how to configure the /var/log/messages files on three routers to include different sets of messages:

  • On the TX Matrix Plus router, local messages with severity info and higher from all facilities. The file does not include messages from the T1600 or T4000 routers, because the host sfc0-master statement disables message forwarding.

  • On the T1600 or T4000 router designated LCC0, messages from the authorization facility with severity info and higher.

  • On the T1600 or T4000 router designated LCC1, messages with severity notice from all facilities.