cc/td/doc/product/cable/svc_ctrl/scappsbb
hometocprevnextglossaryfeedbacksearchhelp
PDF

Table Of Contents

The Real-Time Monitoring Configuration Utility

The Real-Time Monitoring Configuration Utility

The rtmcmd Utility

The rtmcmd Utility

rtmcmd Utility Examples

Information About The User Configuration File

The User Configuration File

rtmcmd User Configuration File Example

User Configuration File Format

Files and Directories

How to Install the CFG and CGI Files for Use by MRTG and RRDTool

First Installation

Files Update


The Real-Time Monitoring Configuration Utility


The Real-Time Monitoring Configuration Utility 

The rtmcmd Utility 

Information About The User Configuration File 

User Configuration File Format 

Files and Directories 

How to Install the CFG and CGI Files for Use by MRTG and RRDTool 

The Real-Time Monitoring Configuration Utility

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 above. The resulting CFG files are compatible with the SCA BB and SCE MIBs of releases 3.0.5 and above.

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 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.

The rtmcmd Utility

The rtmcmd Utility 

rtmcmd Utility Examples 

The rtmcmd Utility

The command-line syntax of the SCA BB Real-Time Monitoring Configuration Utility is:

rtmcmd --sce <SCE addresses>{--file <PQB filename>| (--pqb-sce address>--username <username>--password <password>)} --source-dir <dir>--dest-dir <dir>--config-file <file>

The following table lists the rtmcmd options.

Table 3-1 rtmcmd Options

Option
Abbreviation (if applicable)
Description

--sce <SCE IP address>

-S

( 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 ) The 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 ).


Additional operations can be invoked to display information about the Real-Time Monitoring Configuration Utility using the following syntax:

rtmcmd <operation>

The following table 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

Information About The User Configuration File

The User Configuration File 

rtmcmd User Configuration File Example 

The 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 ". You should edit this file according to the details of your setup.

The following table lists the configuration parameters that should be present in the user configuration file:

Table 3-3 User Configuration File Parameters

Parameter

Description

Default Value

Required/ Optional

rrdtool_bin_dir

An absolute path to the directory where rrdtool and rrdcgi binary files are installed

 

Required

rtm_dir

An absolute path to the directory where RRD archives and CGI files are stored. This is under the web server web directory.

 

Required

mrtg_bin_dir

An absolute path to the directory where MRTG binary files are installed. This location will be used to create MRTG invocation commands in the crontab sample file.

 

Required

snmpCommunityString

The 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

User Configuration File Format

The configuration text file is a listing of key-value pairs, where the key is one of the parameters listed in The User Configuration File, 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 putting 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, like this: "\\", 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

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. It is recommended that the target directory provided to the rtmcmd will be different to the RTM directory. After rtmcmd completes the templates processing, you will be required to copy the CFG and CGI files to the RTM directory (see How to Install the CFG and CGI Files for Use by MRTG and RRDTool ). See also The SCA BB Real-Time Monitoring Environment, page 1-5.

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—The location where rtmcmd will find the report templates

destination directory—The 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—The location and filename of the user configuration file referred to above.

Service Configuration—The location and name of the PQB file. The Service Configuration may alternatively be retrieved from a specified SCE platform. Installing 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 CFG and CGI files have been created by the rtmcmd utility, you must install them into your RTM setup.

First Installation 

Files Update 

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 sub-directories, to the RTM directory. The RTM directory is specified by the rtm_dir property in the rtmcmd user configuration file. The two crontab.txt sample files should be excluded from the copy operation.

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 look something like this:

DETAILED STEPS


Step 1 Copy the entire contents of the target directory created by rtmcmd, including all sub-directories, to the RTM directory. The RTM directory is specified by the rtm_dir property in the rtmcmd user configuration file. The two crontab.txt sample files should be excluded from the copy operation.

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 look something like 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

(The exact details of working with Cron are outside the scope of this document.)

rtmcmd creates two crontab.txt sample files for Windows and for Linux/Unix setups in the destination directory. Use these files to configure Cron.

Note that for Unix/Linux systems, the periodic MRTG invocation command must be followed by an update permission command (chmod) for RRD files providing reading permissions to the web server. For the command details, see the crontab sample file created by the rtmcmd utility.


Note When using SELinux (which is a standard feature of Redhat Enterprise 4), several extra steps might be needed to ensure correct operation of the Apache server. A full discussion of this issue is beyond the scope of this document, but note the following command which would be useful in case SELinux is activated and the system log indicates that httpd encounters permission problems: chcon -R -h -t httpd_sys_content_t <RTM directory>


Note that 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 is recommend:

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.2GHz CPU, and 1GB 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 within the RTM directory. The RTM directory is the same location as specified by the rtm_dir property in the user configuration file.

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.

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.

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.

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.



hometocprevnextglossaryfeedbacksearchhelp

Posted: Wed May 30 14:39:58 PDT 2007
All contents are Copyright © 1992--2007 Cisco Systems, Inc. All rights reserved.
Important Notices and Privacy Statement.