facility-override local0;
}
Configure routing platforms located in and routing platforms located in New York to send
messages to a single remote machine called central-logger.mycompany.com. The
messages from California are assigned alternative facility local0 and the messages from
New York are assigned to alternative facility local2.
•
Configure California routing platforms to aggregate messages in the local0 facility:
[edit system syslog]
host central-logger.mycompany.com {
change-log info;
facility-override local0;
}
•
Configure New York routing platforms to aggregate messages in the local2 facility:
[edit system syslog]
host central-logger.mycompany.com {
change-log info;
facility-override local2;
}
On central-logger, you can then configure the system logging utility to write messages
from the local0 facility to the file california-config and the messages from the local2
facility to the file new-york-config.
Related Topics Junos System Log Alternate Facilities for Remote Logging•
Adding a Text String to System Log Messages
To add a text string to every system log message directed to a remote machine or to the
other Routing Engine, include the log-prefix statement at the [edit system syslog host]
hierarchy level:
[edit system syslog host (hostname | other-routing-engine)]
facility severity;
log-prefix string;
The string can contain any alphanumeric or special character except the equal sign (=)
and the colon (:). It also cannot include the space character; do not enclose the string in
quotation marks (“ “) in an attempt to include spaces in it.
The Junos system logging utility automatically appends a colon and a space to the
specified string. The string is inserted after the identifier for the Routing Engine that
generated the message.
Adding a String
Add the string M120 to all messages to indicate that the router is an M120 router, and
direct the messages to the remote machine hardware-logger.mycompany.com:
[edit system syslog]
host hardware-logger.mycompany.com {
any info;
Copyright © 2010, Juniper Networks, Inc.16
Junos 10.3 System Log Messages Reference