Overview

3 steps to configure Syslog.

  • Define a logging policy
  • Define remote logging servers
  • Define a logging source address (optional)

Configuration

Log to a local file. Logs are stored in the /var/log directory.

Define a logging policy.

cmd
set system syslog user * any emergency
set system syslog file messages any notice
set system syslog file messages authorization info
set system syslog file interactive-commands interactive-commands any

Define remote logging servers.

cmd
set system syslog host syslog-server-1.domain any info
set system syslog host syslog-server-2.domain any info

Define a logging source address.

cmd
set system syslog source-address 10.255.1.1

Verification

Show log file.

cmd
show log messages
show log interactive-commands

Start tailing a log file.

cmd
monitor start interactive-commands

Stop tailing a log file.

cmd
monitor stop