3 Real-Time Monitoring Configuration Utility Introduction

3 Real-Time Monitoring Configuration Utility Introduction
C H A P T E R
3
Real-Time Monitoring Configuration Utility
Revised: September 17, 2012, OL-26823-01
Introduction
This chapter provides an overview of the Real-time monitoring configuration, rtmcmd utility, and user
configuration files.
This chapter consists of these sections:
•
Real-Time Monitoring Configuration Overview, page 3-2
•
rtmcmd Utility, page 3-3
•
Information About the User Configuration File, page 3-5
•
User Configuration File Format, page 3-6
•
Files and Directories, page 3-7
•
How to Install the CFG and CGI Files for Use by MRTG and RRDTool, page 3-8
Cisco SCA BB SNMP Real Time Monitoring User Guide
OL-26823-01
3-1
Chapter 3
Real-Time Monitoring Configuration Utility
Real-Time Monitoring Configuration Overview
Real-Time Monitoring Configuration Overview
The Real-Time Monitoring Configuration Utility (rtmcmd) is a Cisco Service Control software tool for
processing the SCA BB report templates into the appropriate CFG and CGI files.
rtmcmd is:
•
A Java command-line utility.
•
Based on the SCA BB Service Configuration Java API.
•
Can be used on both Windows and Linux platforms (provided with appropriate shell scripts).
•
Compatible with SCA BB Release 3.0.5 and later. The resulting CFG files are compatible with the
SCA BB and SCE MIBs of Releases 3.0.5 and later.
The utility expects the following arguments:
•
The current service configuration from either of these sources:
– A specified PQB file
– A specified SCE platform from which to retrieve the service configuration. Using this option
requires you to specify a username and password.
•
The IP address or host name of the SCE platform from which SNMP data is collected.
•
The directory location of the report templates.
•
The target directory where the resulting CFG and CGI files should be saved. This directory is a
temporary target location.
•
The location of the user configuration file containing the information required for processing the
report templates.
The utility compiles the templates and the PQB file into the actual CFG and CGI files required by MRTG
and RRDTool, and stores the results in the specified target directory.
Cisco SCA BB SNMP Real Time Monitoring User Guide
3-2
OL-26823-01
Chapter 3
Real-Time Monitoring Configuration Utility
rtmcmd Utility
rtmcmd Utility
This section consists of these topics:
•
rtmcmd Utility—Overview, page 3-3
•
rtmcmd Utility—Examples, page 3-4
rtmcmd Utility—Overview
The command-line syntax of the SCA BB Real-Time Monitoring Configuration Utility is:
rtmcmd --sce <SCE IP addresses>{--file <PQB filename>| (--pqb-sce address <SCE
address>--username <username>--password <password>)} --source-dir <dir>--dest-dir
<dir>--config-file <file>
Table 3-1 lists the rtmcmd options.
Table 3-1
rtmcmd Options
Option
Abbreviation
(if applicable)
--sce <SCE IP address>
-S
Description
(Required) IP addresses of one or more SCE platforms
from which SNMP data is collected.
Each IP address must be a valid SCE platform IP address
or SCE hostname.
Enclose multiple addresses in quotation marks,
separated by a semicolon.
For example: --sce “10.1.2.3;10.1.2.4;10.1.2.5”
--file <PQB filename>
-f
(Required if an SCE to retrieve from is not specified)
PQB file to use.
--pqb-sce <SCE address>
-q
(Required if a PQB file is not specified) Hostname or IP
addresses of the SCE platform from which the service
configuration should be retrieved.
--username <username>
-U
(Required if an SCE to retrieve from is specified)
Username for connecting to the SCE platform to retrieve
the service configuration.
--password <password>
-P
(Required if username is specified) Password for
connecting to the SCE platform to retrieve the Service
Configuration.
--source-dir <dir>
-s
(Required) Template files location.
--dest-dir <dir>
-d
(Required) Target directory where the processed
templates should be stored.
--config-file <file>
-c
(Required) (See the “User Configuration File” section
on page 3-5).
Cisco SCA BB SNMP Real Time Monitoring User Guide
OL-26823-01
3-3
Chapter 3
Real-Time Monitoring Configuration Utility
rtmcmd Utility
Additional operations can be invoked to display information about the Real-Time Monitoring
Configuration Utility by using the following syntax:
rtmcmd <operation>
Table 3-2 lists these additional rtmcmd operations.
Table 3-2
rtmcmd Operations
Operation
Description
--version
Display rtmcmd version.
--help
Display rtmcmd help.
rtmcmd Utility—Examples
Create report and configuration files for the specified SCE platforms. Load the service configuration file
from a local file:
rtmcmd --sce=”63.111.106.7;63.111.106.12” --file=servicecfg.pqb
--source-dir=/rtm-templates --dest-dir=/rtm-output
-c ./rtmcmd.cfg
Create report and configuration files for the specified SCE platforms. Retrieve a Service Configuration
file from the specified SCE:
rtmcmd -S “63.111.106.7;63.111.106.12” -U user123 -P ****
--pqb-sce=63.111.106.7 --source-dir=/rtm-templates
--dest-dir=/rtm-output -c ./rtmcmd.cfg
Cisco SCA BB SNMP Real Time Monitoring User Guide
3-4
OL-26823-01
Chapter 3
Real-Time Monitoring Configuration Utility
Information About the User Configuration File
Information About the User Configuration File
This section consists of these topics:
•
User Configuration File, page 3-5
•
rtmcmd User Configuration File Example, page 3-5
User Configuration File
The user configuration file contains user-specific information required by the rtmcmd utility. The
SCA BB utilities distribution package contains a sample configuration file, named rtmcmd.cfg. Edit this
file according to the details of your setup.
Table 3-3 the configuration parameters that should be present in the user configuration file.
Table 3-3
User Configuration File Parameters
Required/
Default Value Optional
Parameter
Description
rrdtool_bin_dir
Absolute path to the directory where rrdtool and
rrdcgi binary files are installed.
—
Required
rtm_dir
Absolute path to the directory where RRD
—
archives and CGI files are stored. This directory is
under the web server web directory.
Required
mrtg_bin_dir
—
Absolute path to the directory where MRTG
binary files are installed. This location is used to
create MRTG invocation commands in the crontab
sample file.
Required
snmpCommunityString SNMP community string to use when accessing
the SCE platforms.
Public
Required
rtmcmd User Configuration File Example
The following is an example rtmcmd user configuration file:
#The absolute path to the RRD tool's execution files folder
#Use '\\' or '/' as path separator
rrdtool_bin_dir=C:/rrdtool-1.2.15/rrdtool/Release
#The absolute path where RTM files will be placed.
#This path will be used by MRTG to create and update the RRD files
#Note: path must not contain white spaces!
rtm_dir=C:/PROGRA~1/APACHE~1/Apache2.2/htdocs
#The absolute path to the MRTG bin folder.
#This path will be used to create file crontab.txt
mrtg_bin_dir=C:/mrtg-2.14.5/bin
#The SCE's community string
snmpCommunityString=public
Cisco SCA BB SNMP Real Time Monitoring User Guide
OL-26823-01
3-5
Chapter 3
Real-Time Monitoring Configuration Utility
User Configuration File Format
User Configuration File Format
The configuration text file is a list of key-value pairs, where the key is one of the parameters listed in the
following format:
•
Each key-value pair is on a separate line.
•
A key-value pair may be extended across several adjacent lines by adding a backslash character at
the end of each line.
•
To use an actual backslash in the value (as in directory names on Windows), the backslash should
be escaped with another backslash (“\\”) or a slash “/” can be used instead.
•
To comment a line, add “#” or “!” at the beginning of the line.
For example:
# This is a comment line.
# Directory names should uses escape backslashes:
rtm_dir=D:\\PROGRA~1\\APACHE~1\\Apache2.2\\htdocs
See the “User Configuration File” section on page 3-5 for details.
Cisco SCA BB SNMP Real Time Monitoring User Guide
3-6
OL-26823-01
Chapter 3
Real-Time Monitoring Configuration Utility
Files and Directories
Files and Directories
The real-time monitoring process requires that you specify a number of files and directories. Following
is a brief summary of all relevant files and directories and where you must specify them:
•
User configuration file:
– rrdtool_bin_dir—Directory where MRTG and the web server will find the RRDTool binary files
– rtm_dir—The RTM directory is where MRTG will create and update the RRDTool archive files.
We recommended that the target directory provided to the rtmcmd be different from the RTM
directory (see the “RTM Directory” section on page 1-8). After rtmcmd completes processing
the templates, copy the CFG and CGI files to the RTM directory. See the “How to Install the
CFG and CGI Files for Use by MRTG and RRDTool” section on page 3-8 and the “SCA BB
Real-Time Monitoring Environment” section on page 1-8.
– mrtg_bin_dir—The location where MRTG binary files are installed. This location is used to
create the MRTG invocation commands written to the crontab sample file.
•
rtmcmd:
– source directory—Location where rtmcmd will find the report templates.
– destination directory—Location where rtmcmd will save the CFG and CGI files that it creates.
After you run rtmcmd, you must move the generated files from this location to the appropriate
MRTG and RRDTool directories.
•
config-file—Location and filename of the user configuration file.
•
Service Configuration—Location and name of the PQB file. The Service Configuration may
alternatively be retrieved from a specified SCE platform.
Cisco SCA BB SNMP Real Time Monitoring User Guide
OL-26823-01
3-7
Chapter 3
Real-Time Monitoring Configuration Utility
How to Install the CFG and CGI Files for Use by MRTG and RRDTool
How to Install the CFG and CGI Files for Use by MRTG and
RRDTool
After the rtmcmd utility creates the CFG and CGI files, install them into your RTM setup.
This section consists of these topics:
•
First Installation, page 3-8
•
Files Update, page 3-9
First Installation
If this is a fresh installation of an RTM setup, complete the following steps.
SUMMARY STEPS
1.
Copy the entire contents of the target directory created by rtmcmd, including all subdirectories, to
the RTM directory. The rtm_dir property, in the rtmcmd user configuration file, specifies the RTM
directory. Do not copy the two crontab.txt sample files.
2.
Add a Cron task that invokes MRTG periodically (every 5 minutes) on these CFG files, by adding a
task line to the crontab file.
DETAILED STEPS
Step 1
Copy the entire contents of the target directory created by rtmcmd, including all subdirectories, to the
RTM directory. The rtm_dir property, in the rtmcmd user configuration file, specifies the RTM directory.
Do not copy the two crontab.txt sample files.
Step 2
Add a Cron task that invokes MRTG periodically (every 5 minutes) on these CFG files, by adding a task
line to the crontab file. On Windows workstations, the line should resemble this:
*/5 * * * * <Full path to the Perl bin directory>\wperl.exe <Full path to the MRTG bin
directory>\mrtg <RTM directory>\mrtg-cfg\<SCE address>_scabb_mrtg.cfg
rtmcmd creates two crontab.txt sample files for Windows and for UNIX/Linux setups in the destination
directory. Use these files to configure Cron.
For UNIX/Linux systems, after the periodic MRTG invocation command, add an update permission
command (chmod) for RRD files providing read permissions to the web server. For the command details,
see the crontab sample file created by the rtmcmd utility.
Note
When using Security Enhanced Linux (which is a standard feature of Redhat Enterprise 4), several extra
steps might be required to ensure correct operation of the Apache server. A full discussion of this issue
is beyond the scope of this document. Note the following command, which would be useful in case
SELinux is activated and the system log indicates that Hyper Text Transfer Protocol Daemon (HTTPD)
encounters permission problems: chcon -R -h -t httpd_sys_content_t <RTM directory>.
Cisco SCA BB SNMP Real Time Monitoring User Guide
3-8
OL-26823-01
Chapter 3
Real-Time Monitoring Configuration Utility
How to Install the CFG and CGI Files for Use by MRTG and RRDTool
The polling done by MRTG creates a CPU load on both the workstation, where MRTG is running, and
on the SCE platform. Therefore, the following configuration is recommended:
•
Polling period of once every 5 minutes
•
Maximum number of SCE platforms polled by a single workstation (assuming a Win2K machine,
with Pentium 4, 3.2 GHz CPU, and 1 GB memory) is 10 SCE platforms
Files Update
The rtmcmd utility is used to create an updated set of MRTG configuration files and report CGI files
when:
•
Adding a new SCE device to the RTM setup.
•
A change in the Service Configuration applied to some SCE devices should be reflected in the
reports.
SUMMARY STEPS
1.
Copy the newly created MRTG CFG files from the mrtg-cfg directory in the rtmcmd target directory
to the mrtg-cfg directory in the RTM directory.
2.
Add a cron task that invokes MRTG periodically on these CFG files.
3.
Update the report CGI files—Copy the updated CGI files from the SCE folder to the appropriate
directory in the RTM directory.
DETAILED STEPS
Step 1
Copy the newly created MRTG CFG files from the mrtg-cfg directory in the rtmcmd target directory to
the mrtg-cfg directory within the RTM directory. The RTM directory is the same location as specified
by the rtm_dir property in the user configuration file.
Step 2
Add a cron task that invokes MRTG periodically (every 5 minutes) on these CFG files, by adding a task
line to the crontab file. This operation is described in detail in Step 2 of the “First Installation” section
on page 3-8.
Step 3
Update the report CGI files—Copy the updated CGI files from the SCE folder created in the rtmcmd
target directory to the appropriate directory in the RTM directory. You can copy the entire SCE folder if
this SCE device has not been monitored before.
Cisco SCA BB SNMP Real Time Monitoring User Guide
OL-26823-01
3-9
Chapter 3
Real-Time Monitoring Configuration Utility
How to Install the CFG and CGI Files for Use by MRTG and RRDTool
Cisco SCA BB SNMP Real Time Monitoring User Guide
3-10
OL-26823-01
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising