Related Documentation
- M Series
- Junos OS System Log Alternate Facilities for Remote Logging
- MX Series
- Junos OS System Log Alternate Facilities for Remote Logging
- PTX Series
- Junos OS System Log Alternate Facilities for Remote Logging
- QFX Series
- Junos OS System Log Alternate Facilities for Remote Logging
- T Series
- Junos OS System Log Alternate Facilities for Remote Logging
Examples: Assigning an Alternative Facility
This topic contains examples of configuring system log messages to use an alternative facility for logging.
The following example shows how to log all messages generated on the switch at the error level or higher to the local0 facility on the remote host called monitor.mycompany.com:
The following example contains two sets of statements that show how to configure switches located in California and in New York to send messages to a single remote host called central-logger.mycompany.com. The messages from California are assigned to alternative facility local0 and the messages from New York are assigned to alternative facility local2.
- The following statements configure the California switch
to aggregate messages in the local0 facility:[edit system syslog]host central-logger.mycompany.com {change-log info;facility-override local0;}
- The following statements configure the New York switch
to aggregate messages in the local2 facility:[edit system syslog]host central-logger.mycompany.com {change-log info;facility-override local2;}
On the remote host named central-logger you can subsequently configure the system logging utility to write messages from the local0 facility to one file (for example, california-config) and the messages from the local2 facility to another file (for example, new-york-config).
Related Documentation
- M Series
- Junos OS System Log Alternate Facilities for Remote Logging
- MX Series
- Junos OS System Log Alternate Facilities for Remote Logging
- PTX Series
- Junos OS System Log Alternate Facilities for Remote Logging
- QFX Series
- Junos OS System Log Alternate Facilities for Remote Logging
- T Series
- Junos OS System Log Alternate Facilities for Remote Logging