Howto Export Juniper NSM logs to CSV file from the NSM CLI

NSM receives logs from all the devices and the logs are stored under /usr/netscreen/DevSvr/var/logs folder on NSM Device server.These logs are saved in binary format and cannot be viewed directly.

To Export logs from the NSM Server, login to the NSM Device Server using the CLI, and then use the utility as follows:

# cd /usr/netscreen/DevSvr/utils/

# sh --help

For example, to export the logs from Device named “Int-FW”, the following command can to used:

#sh --log2action --filter --device global:Int-FW --action --csv --file-path /tmp/Int-FW.csv --include-header

This command will export all the logs in the Log DB for this device “Int-FW” to the file /tmp/Int-FW.csv

Other filter options can be used by following appropriate Syntax as below.

# sh --help

Sponsored Link

Leave a comment

Your email address will not be published. Required fields are marked *