The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
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
•Information About the User Configuration File
•User Configuration File Format
•How to Install the CFG and CGI Files for Use by MRTG and RRDTool
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.
This section consists of these topics:
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.
|
(if applicable) |
|
---|---|---|
--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) 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). |
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.
|
|
---|---|
--version |
Display rtmcmd version. |
--help |
Display rtmcmd help. |
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
This section consists of these topics:
•rtmcmd User Configuration File Example
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.
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
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 for details.
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). 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 and the "SCA BB Real-Time Monitoring Environment" section.
–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.
After the rtmcmd utility creates the CFG and CGI files, install them into your RTM setup.
This section consists of these topics:
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>.
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
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.
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.