Creating And Editing Action Scripts - Juniper NETWORK AND SECURITY MANAGER 2010.2 - ADMINISTRATION GUIDE REV1 Administration Manual

Table of Contents

Advertisement

Copyright © 2010, Juniper Networks, Inc.
export NSMUSER=global/<user name>; export NSMPASSWD=<password>;
/usr/netscreen/GuiSvr/utils/guiSvrCli.sh --generate-reports --report global:<Report Folder>:"\"
report name\" " --script ftp.sh
The export NSMUSER and NSMPASSWORD statements set the username and password
used to generate the report. This user must have appropriate rights on the NSM
management system. You need to create a specific account for this purpose.
You can generate any of the predefined reports by specifying "system" in the <Report
Folder> field, or any user-created report other than those defined in "My Reports" by
specifying "shared" in the <Report Folder> field. You must reference the report with the
full domain path, using a colon to separate domain elements and the report folder.
The script parameter refers to the script, located in the
directory, that is run on completion of the report generation.

Creating and Editing Action Scripts

NOTE: Sample scripts enabling you to e-mail and FTP the report results are available
in
/usr/netscreen/GuiSvr/lib/scripts
recommend that you first copy them to
change the permissions on the scripts so that they are both writable and executable.
You can then customize the scripts to your needs.
Transferring Reports to an FTP Server
The
ftp.sh
script is used to transfer the report to an FTP server. The following portion of
the script needs to be edited:
########################################################################
#
CONFIGURABLE PARAMETERS
########################################################################
# Remote hostname or IP address
remote_host="localhost"
# login for ftp account
userid="ftp"
# password for ftp account
passwd="ftp"
# pick reports from this directory prefix
local_dir_prefix="/usr/netscreen/GuiSvr/var"
E-mailing Reports
To e-mail reports, you must configure two scripts:
—This script is called in the
email.sh
to be included in the e-mail message
Email.pl
—This script is called by
You can attach or embed the report in the e-mail by uncommenting a specific line in
. You can also deliver multiple reports in separate mail messages or in a single
email.sh
collated one.
#########################################################################
#
CODE
#########################################################################
dir=`dirname $0`
/usr/netscreen/GuiSvr/var/scripts
for your convenience. To use these scripts, we
/usr/netscreen/GuiSvr/var/scripts
utility and defines how the reports are
guiSvrCli.sh
email.sh
and configures the actual SMTP parameters.
Chapter 19: Reporting
, and then
793

Advertisement

Table of Contents
loading

This manual is also suitable for:

Network and security manager 2010.2

Table of Contents