Directing Messages to a Remote Machine or the Other Routing Engine
To direct system log messages to a remote machine or to the other Routing Engine on the routing platform, include the
hoststatement at the[edit system syslog]hierarchy level:[edit system syslog]host (hostname| other-routing-engine) {facility severity;explicit-priority;facility-overridefacility;log-prefixstring;match "regular-expression";}source-addresssource-address;To direct system log messages to a remote machine, include the
hosthostnamestatement to specify the remote machine's IP address or fully qualified hostname. The remote machine must be running the standardsyslogdutility. We do not recommend directing messages to another routing platform. In each system log message directed to the remote machine, the hostname of the local Routing Engine appears after the timestamp to indicate that it is the source for the message.To direct system log messages to the other Routing Engine on a routing platform with two Routing Engines installed and operational, include the
host other-routing-enginestatement. Include the statement in each Routing Engine's configuration if you want them both to direct messages to the other Routing Engine. In each system log message directed to the other Routing Engine, the stringre0orre1appears after the timestamp to indicate that the local Routing Engine is the source for the message.For the list of logging facilities and severity levels to configure under the
hoststatement, see Table 7 and Table 8.To record facility and severity level information in each message, include the
explicit-prioritystatement. For more information, see Including Priority in System Log Messages.For information about the
matchstatement, see Using Regular Expressions to Refine the Set of Logged Messages.When directing messages to remote machines, you can use the
source-addressstatement to specify the source address to use. In eachhoststatement, you can also include thefacility-overridestatement to assign an alternative facility and thelog-prefixstatement to add a string to each message. For more information, see the following sections: