Creating And Editing Action Scripts - Juniper NETWORK AND SECURITY MANAGER 2010.3 - 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\
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
script is used to transfer the report to an FTP server. The following portion of
ftp.sh
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:
email.sh
—This script is called in the
to be included in the e-mail message
—This script is called by
Email.pl
You can attach or embed the report in the e-mail by uncommenting a specific line in
email.sh
. You can also deliver multiple reports in separate mail messages or in a single
collated one.
#########################################################################
#
CODE
#########################################################################
dir=`dirname $0`
" --script ftp.sh
for your convenience. To use these scripts, we
/usr/netscreen/GuiSvr/var/scripts
guiSvrCli.sh
utility and defines how the reports are
and configures the actual SMTP parameters.
email.sh
Chapter 20: Reporting
/usr/netscreen/GuiSvr/var/scripts
, and then
809

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the NETWORK AND SECURITY MANAGER 2010.3 - ADMINISTRATION GUIDE REV1 and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Network and security manager 2010.3

Table of Contents