Network and Security Manager Administration Guide
Using the log2action Utility to Export Logs
800
Skip. Directs the system to skip any log for which the script had an error.
Retry. Directs the system to try the action again for the same log. When using
this filter, you must also specify:
Retry Count. Specifies the maximum number of retries to attempt before moving
on to the next log record.
Retry Interval (in seconds). Specifies the number of seconds until the action is
tried again.
You can also use a command line utility on the Device Server to export logs. To export
to XML, CSV, SNMP, Syslog, e-mail, or script format using the
Log in to the NSM Device Server as root.
1.
Change to the utility directory by typing: cd /usr/netscreen/DevSvr/utils.
2.
Specify the common filters, format, and format-specific filters for the format you
3.
want to export to:
sh devSvrCli.sh --log2action<common_filters>--action <format><format_options>
The
utility exports all log records to the specified format. After executing the
log2action
action, the system generates an exit status code of 0 (no errors) or 1 (errors).
The following sections detail common filters, actions, and required and optional
format-specific filters.
Using Filters
The
utility generates data for a maximum of 100,000 logs.
log2action
NOTE: If you want to generate more than 100,000 logs, use the
matches-to-return option to specify the number of logs that you want.
Because of the large volume of logs potentially generated, it is highly recommended that
you specify filtering criteria when using the
report generates data from the earliest date in the log database and stops providing
output after 100,000 logs. In this case, it is possible that you may not get the action
output of your most recent data. Specifying a time filter is recommended in this situation.
Using Time Filters
For example, if you wanted to view data in the logs of 20060317, run the following
command:
./devSvrCli.sh --log2action --filter --log-id 20060317:0-20060317:4294967294 --action --xml
--file-path /tmp/newtest.xml
If you wanted to view data for all logs from 2006/03/15 to 2006/03/17, run the following
command:
log2action
utility. Without filtering, the action
log2action
Copyright © 2010, Juniper Networks, Inc.
utility:
Need help?
Do you have a question about the NETWORK AND SECURITY MANAGER 2010.4 - ADMININISTRATION GUIDE REV1 and is the answer not in the manual?
Questions and answers