Description

After adding J-Series, EX,  or SRX device in NSM, no system logs are seen in NSM log viewer.

Symptoms

Added a Junos devices into NSM using device not reachable workflow.  Upon successfully importing the device, no system logs are shown in NSM log viewer.  This applies to JUNOS with enhanced services on J-Series, Junos for SRX, and Junos for EX switches.

Solution

By default NSM queries for logs on the device. In particular NSM queries for a log file called "default-log-messages". When adding a device using the "device reachable" workflow, NSM will automatically add this log file to the configuration. However, when using "device not reachable" workflow, you must manually add this configuration.

Add a log file called "default-log-messages" and specify structured data. Below is an example:


set system syslog file default-log-messages any
set system syslog user * any emergency
set system syslog file messages any any
set system syslog file messages authorization info
set system syslog file interactive-commands interactive-commands any
set system syslog file default-log-messages any any
set system syslog file default-log-messages structured-data


In NSM, configure this by...
  1. Navigating to Configuration > System > Syslog > File .
  2. Then add a new file called "default-log-messages".
  3. Select which content you would like to send to NSM (in the above example, any auth and any level were selected).
  4. Finally, in Structured Data, check the Enable Feature box.
  5. Apply and then update your device.