Skip to main content

skip to main content

developerWorks  >  Tivoli  >

Consolidated views of IBM Tivoli Directory Server components using IBM Tivoli Monitoring

developerWorks
Document options

Document options requiring JavaScript are not displayed


Rate this page

Help us improve this content


Level: Intermediate

Amit Bhate (abhate@in.ibm.com), Staff Software Engineer, IBM India
Ramakrishna Gorthi (rjgorthi@in.ibm.com), Staff Software Engineer, IBM India

01 Nov 2007

IBM® Tivoli® Monitoring monitors and manages system and network applications on a variety of platforms and keeps track of the availability and performance of all parts of your enterprise. This article shows how IBM Tivoli Monitoring can be used to do a consolidated monitoring of specific components of the IBM Tivoli Directory Server.

Introduction

Any successful deployment of a directory solution requires ongoing monitoring to ensure that system performance and availability meets organization's goals. This article documents a procedure to do a consolidated monitoring of specific components of the Tivoli Directory Server using the Tivoli Monitoring Universal Agent. The article helps organizations to have single view statistics of the entire replication and the distributed directory topologies.

This article mostly focusses on monitoring Tivoli Directory Server version 6.1, but it can be extended to higher versions of Tivoli Directory Server by following the documented examples.

Some of the key questions that this article addresses that are important to a Tivoli Directory Server deployment are:

  • What is the status of all the queues in the replication topology?
  • Is any of the servers in the replication topology out of sync?
  • How good is the proxy server serving requests?
  • Is there any overloaded back-end server in the distributed directory topology?

There are numerous ways of presenting data in the Tivoli Enterprise Portal Client. One of the ways in which monitoring data is presented in the TEPC workspace is:

Figure 1: TDS monitoring statistics in Tivoli Enterprise Portal Client
Tivoli Enterprise Portal Client

Tabulated below are some acronyms used throughout the article. These may/may not be the official names associated with the respective products.

LDAP:Lightweight Directory Access Protocol
TDS:IBM Tivoli Directory Server
ITM:IBM Tivoli Monitoring
UA:Universal Agent
TEPC:Tivoli Enterprise Portal Client
TEMS:Tivoli Enterprise Monitoring Server

IBM Tivoli Directory Server

The IBM Tivoli Directory Server implements the Internet Engineering Task Force (IETF) LDAP V3 specifications. It also includes enhancements added by IBM in functional and performance areas. It uses IBM DB2® as the backing store to provide per LDAP operation transaction integrity, high performance operations, and on-line backup and restore capability. The IBM Tivoli Directory Server interoperates with the IETF LDAP V3 based clients.

The following figure provides a high level overview of the various components of the directory server and how the clients interact with it.

Figure 2: Tivoli Directory Server
Tivoli Directory Server

IBM Tivoli Monitoring

IBM Tivoli Monitoring monitors and manages system and network applications on a variety of platforms and keeps track of the availability and performance of all parts of your enterprise. IBM Tivoli Monitoring provides reports you can use to track trends and troubleshoot problems. You can use IBM Tivoli Monitoring to perform the following tasks:
  • Visualize real-time monitoring data from your environment.
  • Monitor resources in your environment for certain conditions, such as high CPU or an unavailable application.
  • Establish performance thresholds and raise alerts when thresholds are exceeded or values are matched.
  • Trace the causes leading up to an alert.
  • Create and send commands to systems in your managed enterprise by means of the Take Action feature.
  • Use integrating reporting to create comprehensive reports about system conditions.
  • Monitor conditions of particular interest by defining custom queries using the attributes from an installed agent or from an ODBC-compliant data source.

Software pre-requisites

The article is written with the following software requirements:

  • IBM Tivoli Monitoring Version 6.1.0
  • IBM Tivoli Universal Agent Version 6.1.0
  • IBM Tivoli Directory Server Version 6.1

The information about installing these products is available through the links in the Resources section below.

This article will cover the information on setting up the Universal Agent. For information about configuring/setting-up the rest of the products, see the documents in the Resources section below.



Back to top


Distributed directory and Replication setup

As mentioned in the introduction section, this article addresses some key questions pertaining the directory server. The answers are in the form of consolidated views of the following two directory server components:

  • Distributed Directory
  • Replication

This article describes a monitoring solution with respect to the following distributed directory topology:

Figure 3: Distributed directory topology with replication
Distributed directory topology
where,
The Proxy Server acts as a front-end for data split into two partitions:
  • Partition 1
  • Partition 2
Partition 1 contains 5 servers, inter connected through replication. These 5 servers are scattered across two sites, Site 1 and Site 2.
  • Site 1 has a Gateway (Gateway 1), a Peer (PG1) and a Replica (RG1).
  • Site 2 has a Gateway (Gateway 2) and a Peer (PG2).
Partition 2 contains just one server in it.

The basic server used to setup all the above instances is assumed to be lbmw.in.ibm.com and the servers are running on the following ports:

Server Instance Port
Proxy489
Gateway 12389
Gateway 26389
Partition 2 Server5389
PG1389
PG21389
RG13389

The entire topology shown in Figure 3 above is used for monitoring the consolidated distributed directory statistics.

The replication topology for Partition 1 is used for monitoring the consolidated replication statistics.



Back to top


Universal Agent Essentials

Tivoli Enterprise Monitoring Agents are installed on the systems or subsystems whose applications and resources are to be monitored. The agent collects monitoring data from the managed system and passes it to the monitoring server to which it is connected. The client gathers the current values of the attributes and produces reports formatted into tables and charts. It can also test the values against a threshold and display an alert icon when that threshold is exceeded or a value is matched. These tests are called situations.

The IBM Tivoli Universal Agent is a generic agent of IBM Tivoli Monitoring. You can configure the IBM Tivoli Universal Agent to monitor any data you collect. You can view the data in real-time and historical workspaces on the Tivoli Enterprise Portal and manage with Tivoli Enterprise Portal monitoring situations and automation policies, the same as data from other Tivoli Enterprise Monitoring Agents.

The Universal Agent is thoroughly documented in the IBM Tivoli Universal Agent User's Guide, but a few details are worth mentioning here.

Starting and stopping the Universal Agent

The Universal Agent can be started or stopped using the itmcmd command.

To start the Universal Agent use:

$CANDLEHOME/bin/itmcmd agent start um

To stop the Universal Agent use:

$CANDLEHOME/bin/itmcmd agent stop um

On Linux, CANDLEHOME is typically set to /opt/IBM/ITM, if the default installation path is followed.

Another environment variable that needs to be set for the Universal Agent to work is the UAHOME. On Linux, the UAHOME is set to /opt/IBM/ITM/li6243/um. These settings may change with the operating system and with the path of installation.

If you prefer GUI for the settings, you can right-click on the Universal Agent in the Navigator view and choose Start, Stop or Restart.

The Navigator view can be launched using:

$CANDLEHOME/bin/itmcmd manage

Defining data in the Universal Agent

An IBM Tivoli Universal Agent application consists of one or more attribute groups, each group consisting of one or more attributes. The application to be monitored is defined in a data definition file, called a metafile, which is imported by the IBM Tivoli Universal Agent. The command to import the metafile is um_console.

The metafile is a plain text file. It contains the following control statements in the order shown (if present):

Control Statements
SNMP For SNMP Data Providers only, introduces the data definition for IBM Tivoli Monitoring provided SNMP MIB applications. SNMP TEXT introduces the data definition for user-defined SNMP applications.
APPL Specifies the name that IBM Tivoli Monitoring uses for the application.
NAME Defines the name of an attribute group, the type of data being collected, and the period for which the data is valid.
INTERNAL Provides for data redirection between attribute groups as a way to perform additional processing.
SOURCE Defines the location of the data you are collecting.
RECORDSET For File Data Providers only, defines the set of records from which the data provider extracts data.
CONFIRM For Socket Data Providers only, specifies the requirements for data acknowledgment.
SQL For ODBC Data Providers only, defines the Select statement or stored procedure to use for collecting relational data.
SUMMARY Defines the requirements for gathering the frequency of data input during monitoring.
ATTRIBUTES Introduces the attribute definitions and specifies the attribute delimiters in the data string. Below the ATTRIBUTES control statement, list the individual attribute definition statements.

Note: Ensure that the $UAHOME/work/KUMPCNFG file has a mention of the mdl file you have written. um_console would take care of this for you, but that's something you can cross check.

Choosing a data collection approach

The Universal Agent supports several different ways of providing data to the monitoring server, including log file parsing and script execution, all of which will be used in this article. The Universal Agent can also receive events via SNMP and API calls, as well as monitor Web servers via URL polling, and databases via ODBC and receive data over sockets; however, this article does not make use of those capabilities.

The best choice of data provider is going to be influenced by the source of the data and how you want to monitor it, that is, polled, continuously, or event-driven. Since any data manipulation (for example, calculating operations outstanding, operation completion rate) must be done by the data provider before the TEMS receives it and passes it on to the portal, the choice of data provider becomes important.

When the data of interest is already in a log file and just needs to be parsed and provided to the monitoring server as it is written to the log file, the log file adapter is the most useful tool to use. If only simple calculations (add, subtract, divide or multiply integers) need to be performed on the data before sending it to the monitoring server, the calculations may be embedded in the metafile data descriptions and performed by the logfile adapter.

If more advanced processing needs to be done (e.g. calculating response times from timestamps) the best approach is the socket provider, which can receive data from a program or script that reads the log file, performs the processing and writes the data to a socket connected to the Universal Agent.

When the data needs to be retrieved periodically from some utility (e.g. using ldapsearch to fetch the cn=monitor statistics) then an executable invoked by the script data provider is the best approach.

Viewing Tivoli Monitoring data

This section provides information as to how the Tivoli Monitoring graphs/reports can be viewed. These are the graphs/reports that the portal generates in response to the metafile and scripts shown in the article. There are a couple of ways for viewing the graphs/reports:

  • Launch the GUI for managing the Tivoli Enterprise Monitoring Services using the command:

    $CANDLEHOME/bin/itmcmd manage


    In the above GUI, right click on the Tivoli Enterprise Portal Desktop Client and hit on Start.
  • Launch the Tivoli Enterprise Portal using the link:

    http://host:1920///cnp/kdb/lib/cnp.html


    where,
    host is the name of the system where the Tivoli Enterprise Portal Server is running.

Once the Tivoli Enterprise Portal is launched, in the navigator on the left, you would find the hostname of the monitoring server listed under the node of the corresponding operating system. Under the Universal Agent select the application host:TDSxx to list down the attribute groups you have in your mdl file.

Here's a screenshot of the navigator showing a Universal Agent on a Linux system.

Figure 4: Universal Agent Navigator
Universal Agent Navigator

Describing the data to be monitored

All of the definitions developed in the rest of this paper will be contained in the metafile for the TDS application. The file is named tds.mdl, which starts with declaring the name of the application like this:

//APPL TDS @ Monitoring for Tivoli Directory Server

Note: Everything after "@" is a comment

This declares the name of the application as TDS, which will show up in the Portal underneath the node name as an application named TDSnn, where nn is the version number of the metafile, starting initially at 00 and incrementing each time you make significant changes to it. The IBM Tivoli Universal Agent User's Guide lists the types of metafile updates that result in major or minor version changes.

After the name of the application, the data description is provided to the Universal Agent. The data is described to the Universal agent in the format as below:

//NAME ProxyMonitorStats P 60 AddTimeStamp @ TDS Proxy monitor stats
//SOURCE FILE /opt/IBM/ITM/li6243/um/scripts/proxy.dat COPY
//INTERNAL OUTPUT PxyMonStats2
//ATTRIBUTES ';'

In the above example, the data description starts with the //NAME line, naming the attribute group ProxyMonitorStats, giving it a type of P (polled) with a 60 second lifetime, and have the Universal Agent add a timestamp each time the file is read. The //SOURCE line declares the source of the data is a log file named proxy.dat, which copies recently polled data in the internal buffer with the "COPY" clause. The "COPY" clause indicates that the file be handled in the block mode. The data is saved to an internal buffer name PxyMonStats2 for further processing by another attribute group. The data is separated by semicolons.

After the above data description, the type of each attribute is specified. Here are some examples of the different attribute types:

Attribute types
APP_VersionD50  
TotalConnectionsC99999999  
OpsCompletionRateK4  
TotalResultsSentG99999999  

Display strings, such as the APP_version string, are declared with a D followed by the maximum length of the string. Integer values, such as the TotalConnections counter, are declared with a C followed by the maximum value of the integer. Place holders for attributes which can be skipped are declared with the type K. Integer attributes like TotalResultsSent which need to store negative values are declared with type G.



Back to top


Consolidated Distributed Directory Monitoring

This section provides details as to how monitor searches can help in getting the consolidated results of the distributed directory topology.

Proxy Monitor Search Analysis

The statistics of the Proxy Server at any given instant of time can be gathered using the monitor search. It's a base-scoped search against "cn=proxy, cn=monitor". The interaction between the proxy server and the corresponding back-end servers is tracked using a base-scoped search against "cn=backends, cn=proxy, cn=monitor".

A base-scoped search against "cn=proxy, cn=monitor" will provide information of the type:

CN=PROXY,CN=MONITOR
version=IBM Tivoli Directory, 6.1
totalconnections=10
totalusedconnections=0
totalsslconnections=0
totalusedsslconnections=0
opsinitiated=55063
opscompleted=55062
searchesrequested=55063
searchescompleted=55062
bindsrequested=0
bindscompleted=0
unbindsrequested=0
unbindscompleted=0
addsrequested=0
addscompleted=0
deletesrequested=0
deletescompleted=0
modrdnsrequested=0
modrdnscompleted=0
modifiesrequested=0
modifiescompleted=0
comparesrequested=0
comparescompleted=0
abandonsrequested=0
abandonscompleted=0
extopsrequested=0
extopscompleted=0
unknownopsrequested=0
unknownopscompleted=0
totalresultssent=55062
totalsuccessresultssent=55062
totalfailedresultssent=0
totalentriessent=3850309
totalreferencessent=0
transactionsrequested=0
transactionscompleted=0
transactionpreparesrequested=0
transactionpreparescompleted=0
transactioncommitsrequested=0
transactionscommitted=0
transactionrollbacksrequested=0
transactionsrolledback=0

A base-scoped search against "cn=backends, cn=proxy, cn=monitor" will provide information of the type:

CN=lbmw.in.ibm.com:389,CN=BACKENDS,CN=PROXY,CN=MONITOR
version=IBM Tivoli Directory, 6.1
totalconnections=5
totalusedconnections=0
totalsslconnections=0
totalusedsslconnections=0
opsinitiated=66296
opscompleted=66296
searchesrequested=66286
searchescompleted=66286
bindsrequested=5
bindscompleted=5
unbindsrequested=0
unbindscompleted=0
addsrequested=0
addscompleted=0
deletesrequested=0
deletescompleted=0
modrdnsrequested=0
modrdnscompleted=0
modifiesrequested=0
modifiescompleted=0
comparesrequested=0
comparescompleted=0
abandonsrequested=0
abandonscompleted=0
extopsrequested=5
extopscompleted=5
unknownopsrequested=0
unknownopscompleted=0

CN=lbmw.in.ibm.com:1389,CN=BACKENDS,CN=PROXY,CN=MONITOR
version=IBM Tivoli Directory, 6.1
totalconnections=0
totalusedconnections=0
totalsslconnections=0
totalusedsslconnections=0
opsinitiated=555145
opscompleted=555145
searchesrequested=0
searchescompleted=0
bindsrequested=277575
bindscompleted=277575
unbindsrequested=277570
unbindscompleted=277570
addsrequested=0
addscompleted=0
deletesrequested=0
deletescompleted=0
modrdnsrequested=0
modrdnscompleted=0
modifiesrequested=0
modifiescompleted=0
comparesrequested=0
comparescompleted=0
abandonsrequested=0
abandonscompleted=0
extopsrequested=0
extopscompleted=0
unknownopsrequested=0
unknownopscompleted=0

CN=lbmw.in.ibm.com:2389,CN=BACKENDS,CN=PROXY,CN=MONITOR
version=IBM Tivoli Directory, 6.1
totalconnections=0
totalusedconnections=0
totalsslconnections=0
totalusedsslconnections=0
opsinitiated=555119
opscompleted=555119
searchesrequested=0
searchescompleted=0
bindsrequested=277562
bindscompleted=277562
unbindsrequested=277557
unbindscompleted=277557
addsrequested=0
addscompleted=0
deletesrequested=0
deletescompleted=0
modrdnsrequested=0
modrdnscompleted=0
modifiesrequested=0
modifiescompleted=0
comparesrequested=0
comparescompleted=0
abandonsrequested=0
abandonscompleted=0
extopsrequested=0
extopscompleted=0
unknownopsrequested=0
unknownopscompleted=0

CN=lbmw.in.ibm.com:3389,CN=BACKENDS,CN=PROXY,CN=MONITOR
version=IBM Tivoli Directory, 6.1
totalconnections=0
totalusedconnections=0
totalsslconnections=0
totalusedsslconnections=0
opsinitiated=603231
opscompleted=311280
searchesrequested=0
searchescompleted=0
bindsrequested=301618
bindscompleted=9667
unbindsrequested=301613
unbindscompleted=301613
addsrequested=0
addscompleted=0
deletesrequested=0
deletescompleted=0
modrdnsrequested=0
modrdnscompleted=0
modifiesrequested=0
modifiescompleted=0
comparesrequested=0
comparescompleted=0
abandonsrequested=0
abandonscompleted=0
extopsrequested=0
extopscompleted=0
unknownopsrequested=0
unknownopscompleted=0

CN=lbmw.in.ibm.com:5389,CN=BACKENDS,CN=PROXY,CN=MONITOR
version=IBM Tivoli Directory, 6.1
totalconnections=5
totalusedconnections=0
totalsslconnections=0
totalusedsslconnections=0
opsinitiated=43828
opscompleted=43828
searchesrequested=43818
searchescompleted=43818
bindsrequested=5
bindscompleted=5
unbindsrequested=0
unbindscompleted=0
addsrequested=0
addscompleted=0
deletesrequested=0
deletescompleted=0
modrdnsrequested=0
modrdnscompleted=0
modifiesrequested=0
modifiescompleted=0
comparesrequested=0
comparescompleted=0
abandonsrequested=0
abandonscompleted=0
extopsrequested=5
extopscompleted=5
unknownopsrequested=0
unknownopscompleted=0

CN=lbmw.in.ibm.com:6389,CN=BACKENDS,CN=PROXY,CN=MONITOR
version=IBM Tivoli Directory, 6.1
totalconnections=0
totalusedconnections=0
totalsslconnections=0
totalusedsslconnections=0
opsinitiated=555121
opscompleted=555121
searchesrequested=0
searchescompleted=0
bindsrequested=277563
bindscompleted=277563
unbindsrequested=277558
unbindscompleted=277558
addsrequested=0
addscompleted=0
deletesrequested=0
deletescompleted=0
modrdnsrequested=0
modrdnscompleted=0
modifiesrequested=0
modifiescompleted=0
comparesrequested=0
comparescompleted=0
abandonsrequested=0
abandonscompleted=0
extopsrequested=0
extopscompleted=0
unknownopsrequested=0
unknownopscompleted=0

Both the above searches are supported only by the Proxy Server. These search results need to be consolidated in a single view to provide the status of the entire distributed directory. The consolidation can be done by means of a C program.

Note: Both the above searches are fired against the Proxy Server shown in Figure 3 above.

The following assumptions are made for explaining the program details:

  • The LDAP URL of the proxy server is passed to the program.
  • The program dumps the consolidated monitoring statistics to proxy.dat
  • The program name is proxyMonitor.c and the corresponding binary is named proxyMonitor.

Here's the algorithm that proxyMonitor.c should be following:
  1. When the program is invoked, transfer the contents of proxy.dat to proxyOld.dat. The basic intent of this step is to store the data from a previous run of the program in a different file i.e. proxyOld.dat
  2. Ensure that proxy.dat is blank and open it in append mode so that formatted data can be dumped to it as and when the data is ready.
  3. Read the contents of proxyOld.dat in memory. This would be required to calculate the completion rate of different operations.
  4. Perform a proxy front-end monitor search on the Proxy Server:

    ldapsearch -h <ProxyHostName> -p <ProxyPort> -D <bindDN> -w <bindPW> -b "cn=proxy, cn=monitor" -s base objectclass=*


  5. Collect the output of the above command in a file and then read the same in memory.
  6. Parse this data to form a semicolon(;) separated list of all the attribute values.
  7. Calculate the rate of change of these attribute values with respect to the data in proxyOld.dat.
    e.g. (OperationsCompleted from Step 5 - OperationsCompleted from proxyOld.dat)/60 would give the OperationCompletionRate.
    Note that in this calculation it is assumed that the proxy statistics are collected in intervals of 60 seconds.
  8. Append the compiled data to proxy.dat in the format APP_Version;Proxy;Server:Port;Data
    where,
    APP_Version is the string "IBM Tivoli Directory, 6.1"
    Proxy is the string "Proxy"
    Server:Port is the Hostname:port OR HostIP:port of the system on which the proxy server is running.
    Data is the data collected and calculated in the previous step.
  9. Perform a proxy back-end monitor search on the Proxy Server.

    ldapsearch -h <ProxyHostName> -p <ProxyPort> -D <bindDN> -w <bindPW> -b "cn=backends, cn=proxy, cn=monitor" -s base objectclass=*


  10. Collect the output of the above command in a file and then read the same in memory.
  11. Parse this data to form a semicolon(;) separated list of all the attribute values.
  12. Calculate the rate of change of these attribute values with respect to the data in proxyOld.dat. This procedure is similar to the one performed in Step 7 above.
    The only difference between the calculations of the proxy back-end statistics and the proxy front-end statistics is that in the case of proxy back-end statistics, a set of rows is to be handled. The number of rows depends upon the number of back-end servers configured for the proxy server. The statistics for each back-end server are stored on a newline.
  13. Append the compiled data to proxy.dat in the format APP_Version;Backend[1..n];Server:Port;Data
    where,
    APP_Version is the string "IBM Tivoli Directory, 6.1"
    Backend[1..n] is the string "Backend1" for the 1st. back-end, "Backend2" for the 2nd. back-end and so on till the nth back-end.
    Server:Port is the Hostname:port OR HostIP:port of the system on which the back-end server is running.
    Data is the data collected and calculated in the previous step.
  14. The proxy back-end monitor searches don't have as many attributes as are displayed by the proxy front-end monitor searches. While entering data in proxy.dat enter -1 as the value against such attributes.

Note: The proxy front-end statistics detail the statistics of the proxy server. The proxy back-end statistics detail the statistics of the interaction between the proxy server and the corresponding back-end servers. proxy.dat is a consolidation between the proxy front-end and back-end statistics.

Here's how the proxy.dat file will look like after the above procedure:

IBM Tivoli Directory, 6.1;Proxy;lbmw.in.ibm.com:6389;25;0;0;0;30669;30668;0;8408;8407;0;6;6;0;8454;8454;0;13801;13801; 0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;30668;29480;1188;14434;0;0;0;0;0;0;0;0;0;0;0;0;0
IBM Tivoli Directory, 6.1;Backend1;lbmw.in.ibm.com:1389;5;1;0;0;25249;25249;0;11484;11484;0;5;5;0;0;0;0;13749;13749; 0;0;0;0;0;0;0;0;0;0;6;6;0;0;0;0;5;5;0;0;0;0;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1
IBM Tivoli Directory, 6.1;Backend2;lbmw.in.ibm.com:2389;5;0;0;0;91482;46914;-742;2306;2306;0;44583;15;-742;44578;44578; 0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;15;15;0;0;0;0;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1
IBM Tivoli Directory, 6.1;Backend3;lbmw.in.ibm.com:3389;5;0;0;0;18;18;0;8;8;0;5;5;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0; 0;0;0;0;5;5;0;0;0;0;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1
IBM Tivoli Directory, 6.1;Backend4;lbmw.in.ibm.com:4389;5;0;0;0;4644;4644;0;4585;4585;0;5;5;0;0;0;0;49;49;0;0;0;0;0;0; 0;0;0;0;0;0;0;0;0;0;5;5;0;0;0;0;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1
IBM Tivoli Directory, 6.1;Backend5;lbmw.in.ibm.com:5389;5;0;0;0;18;18;0;8;8;0;5;5;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0; 0;0;0;0;5;5;0;0;0;0;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1
IBM Tivoli Directory, 6.1;Backend6;lbmw.in.ibm.com:6389;5;0;0;0;18;18;0;8;8;0;5;5;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0; 0;0;0;0;5;5;0;0;0;0;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1;-1

Note: The data in the above table is formatted for better readability. The actual file should contain seven lines corresponding to the above table containing seven rows. Each line starts with IBM Tivoli Directory.

The mdl file needs to be updated to display the attributes gathered out of the monitor search. The mdl file (tds.mdl) will look like:

Attribute group for fetching proxy monitoring statistics
//NAME ProxyMonitorStats P 60 AddTimeStamp @ TDS Proxy monitor stats
//SOURCE FILE /opt/IBM/ITM/li6243/um/scripts/proxy.dat COPY
//INTERNAL OUTPUT PxyMonStats2
//ATTRIBUTES ';'
APP_VersionD50    
ProxyOrBackendD100    
ServerPortD100    
TotalConnectionsC99999999    
TotalUsedConnectionsC99999999    
TotalSSLConnectionsC99999999    
TotalUsedSSLConnectionsC99999999    
OpsInitiatedC99999999    
OpsCompletedC99999999    
OpsCompletionRateK4    
SearchesRequestedC99999999    
SearchesCompletedC99999999    
SearchRateK4    
BindsRequestedC99999999    
BindsCompletedC99999999    
AuthRateK4    
UnbindsRequestedC99999999    
UnbindsCompletedC99999999    
UnbindRateK4    
AddsRequestedC99999999    
AddsCompletedC99999999    
AddRateK4    
DeletesRequestedC99999999    
DeletesCompletedC99999999    
DelRateK4    
ModRDNsRequestedC99999999    
ModRDNsCompletedC99999999    
ModRDNRateK4    
ModifiesRequestedC99999999    
ModifiesCompletedC99999999    
ModRateK4    
ComparesRequestedC99999999    
ComparesCompletedC99999999    
CompareRateK4    
AbandonsRequestedC99999999    
AbandonsCompletedC99999999    
AbandonRateK4    
ExtOpsRequestedC99999999    
ExtOpsCompletedC99999999    
ExtOpsRateK4    
UnknownOpsRequestedC99999999    
UnknownOpsCompletedC99999999    
UnknownOpCompletionRateK4    
* Attributes here on aren't applicable to the Proxy Backends.
* Would be displaying -1 for these fields.
TotalResultsSentG99999999    
TotalSuccessResultsSentG99999999    
TotalFailedResultsSentG99999999    
TotalEntriesSentG99999999    
TotalReferencesSentG99999999    
TransactionsRequestedG99999999    
TransactionsCompletedG99999999    
TransactionRateK4    
TransactionPrepRequestedG99999999    
TransactionPrepCompletedG99999999    
TransactionPrepRateK4    
TransactionCommitsRequestedG99999999    
TransactionsCommittedG99999999    
TransactionCommitRateK4    
TransactionRollBacksRequestedG99999999    
TransactionsRolledBackG99999999    
TransactionRollBackRateK4    
*

Note: Everything after "*" is a comment

As seen earlier, proxy.dat would be populated by proxyMonitor. However, there needs to be a mechanism in place which would invoke proxyMonitor periodically. This can be achieved by means of the following attribute group:

//NAME ~ProxyMonitorStatFetch S 60 Interval=60 ProxyMonitorSearch @ TDS Fetch Proxy monitor search information
//SOURCE SCRIPT /opt/IBM/ITM/li6243/um/scripts/proxyMonitor "ldap://lbmw.in.ibm.com:4389"
//INTERNAL OUTPUT PxyMonStats1
//ATTRIBUTES ';'
APP_Version D 50
*

The attribute group used to specify the binary for fetching the proxy monitor data is named ~ProxyMonitorStatFetch. The ~ signifies that this is an invisible attribute group and hence won't be displayed in the console. It is just used for fetching the data and populating the proxy.dat file. The actual work of displaying the data is done by the ProxyMonitorStats and the ProxyStats attribute groups. ~ProxyMonitorStatFetch is invoked in intervals of 60 seconds and the LDAP URL of the proxy server is passed as an argument to proxyMonitor.

Graphs on Proxy Monitor Search results

Launch the TEPC using the steps shown in section Viewing Tivoli Monitoring data.

Using the data collected through the attribute group ProxyMonitorStats, a set of graphs can be drawn.

Click on the ProxyMonitorStats attribute group in the Left navigation to see the basic report for the collected data. It is in the form of a table:

Figure 5: Proxy Monitor Search Results
Proxy monitor search results

A bar chart can be plotted to see a consolidated view of any given attribute for the Proxy Server and the corresponding back-end servers.
  • Open the report for the ProxyMonitorStats attribute group, by clicking on the same in the navigator on the left.
  • Click the Bar Chart tool icon Bar chart and click on the Table view which contains the data to be plotted.
  • A dialog box will pop-up providing you the option of selecting the attributes that can be plotted in the bar chart.
  • Select OpsInitiated and click OK.

    Figure 6: Select attributes for plotting bar chart
    Select attributes for plotting bar chart


A bar chart would be plotted in response to the above steps. Adjust the graph properties using "Right click" -> "Properties" on the graph that's plotted. In the tab named "Style", tailor the properties of the "Category Axis" to provide the "Attribute" for the x-axis.

Figure 7: Select the attribute for the X-Axis
Select the attribute for the X-Axis

The final bar chart would look as follows:

Figure 8: Operations initiated
Operations initiated

On similar lines, we can have the bar chart for OpsCompleted as well:

Figure 9: Operations completed
Operations completed

Proxy Performance statistics

A lot of the data returned by "cn=proxy, cn=monitor" and "cn=backends, cn=proxy, cn=monitor" searches is in the form of counters, e.g. OpsInitiated and OpsCompleted. By doing some simple arithmetic we can derive useful results, such as current operations in progress, which is (OpsInitiated - OpsCompleted). The Universal Agent can do this arithmetic for us through derived variables in the metafile.

For the example of the operations in progress, we declare OpsOutstanding like this:

OpsOutstanding                   (OpsInitiated - OpsCompleted)

proxyMonitor would compute the completion rate for operations as well. The polling interval is passed to proxyMonitor to do these computations. The Universal Agent can perform these calculations if there is just one single row to work upon. For multiple rows in the output, the numbers picked up to calculate the difference aren't the way they are supposed to be. So, it is required that the completion rates be computed in the C code (proxyMonitor.c) itself.

The proxy.dat generated by proxyMonitor is used to view the "Proxy Performance Statistics".

As far as the Universal Agent goes, we start with the "//NAME" line, naming the attribute group ProxyStats, giving it a type of P (polled) with a 60 second lifetime, and have the Universal Agent add a timestamp each time the file is read. The "//SOURCE" line declares the source of the data is a log file named proxy.dat which copies recently polled data in the internal buffer with the "COPY" clause. The "COPY" clause basically indicates that the file be handled in the block mode. The data is saved to an internal buffer named PxyMonStats for further processing by another attribute group, and the data is declared to be separated by semicolons:

//NAME ProxyStats P 60 AddTimeStamp @ TDS Proxy monitor stats
//SOURCE FILE /opt/IBM/ITM/li6243/um/scripts/proxy.dat COPY
//INTERNAL OUTPUT PxyMonStats
//ATTRIBUTES ';'

After this we declare the type of each attribute value:

Attribute types in the ProxyStats attribute group
APP_VersionD50
ProxyOrBackendD100
ServerPortD100
TotalConnectionsK4
TotalUsedConnectionsK4
TotalSSLConnectionsK4
TotalUsedSSLConnectionsK4
OpsInitiatedC99999999
OpsCompletedC99999999
OpsOutStanding   (OpsInitiated - OpsCompleted)
OpsCompletionRateC99999999
SearchesRequestedC99999999
SearchesCompletedC99999999
SearchesOutStanding   (SearchesRequested - SearchesCompleted)
SearchRateC99999999
BindsRequestedC99999999
BindsCompletedC99999999
BindsOutStanding   (BindsRequested - BindsCompleted)
AuthRateC99999999
UnbindsRequestedC99999999
UnbindsCompletedC99999999
UnbindsOutStanding   (UnbindsRequested - UnbindsCompleted)
UnbindRateC99999999
AddsRequestedC99999999
AddsCompletedC99999999
AddsOutStanding   (AddsRequested - AddsCompleted)
AddRateC99999999
DeletesRequestedC99999999
DeletesCompletedC99999999
DeletesOutStanding   (DeletesRequested - DeletesCompleted)
DelRateC99999999
ModRDNsRequestedC99999999
ModRDNsCompletedC99999999
ModRDNsOutStanding   (ModRDNsRequested - ModRDNsCompleted)
ModRDNRateC99999999
ModifiesRequestedC99999999
ModifiesCompletedC99999999
ModifiesOutstanding   (ModifiesRequested - ModifiesCompleted)
ModRateC99999999
ComparesRequestedC99999999
ComparesCompletedC99999999
ComparesOutstanding   (ComparesRequested - ComparesCompleted)
CompareRateC99999999
AbandonsRequestedC99999999
AbandonsCompletedC99999999
AbandonsOutstanding   (AbandonsRequested - AbandonsCompleted)
AbandonRateC99999999
ExtOpsRequestedC99999999
ExtOpsCompletedC99999999
ExtOpsOutstanding   (ExtOpsRequested - ExtOpsCompleted)
ExtOpsRateC99999999
UnknownOpsRequestedC99999999
UnknownOpsCompletedC99999999
UnknownOpsOutStanding   (UnknownOpsRequested - UnknownOpsCompleted)
UnknownOpCompletionRateC99999999
* Attributes here on aren't applicable to the Proxy Backends.
* Would be displaying -1 for these fields.
TotalResultsSentK4
TotalSuccessResultsSentK4
TotalFailedResultsSentK4
TotalEntriesSentK4
TotalReferencesSentK4
TransactionsRequestedG99999999
TransactionsCompletedG99999999
TansactionsOutStanding   (TransactionsRequested - TransactionsCompleted)
TransactionRateG99999999
TransactionPrepRequestedG99999999
TransactionPrepCompletedG99999999
TransactionPrepsOutStanding   (TransactionPrepRequested - TransactionPrepCompleted)
TransactionPrepRateG99999999
TransactionCommitsRequestedG99999999
TransactionsCommittedG99999999
TransactionCommitsOutstanding   (TransactionCommitsRequested - TransactionsCommitted)
TransactionCommitRateG99999999
TransactionRollBacksRequestedG99999999
TransactionsRolledBackG99999999
TransactionRollBacksOutstanding   (TransactionRollBacksRequested - TransactionsRolledBack)
TransactionRollBackRateG99999999
*

Display strings, such as the APP_version string, are declared with a D followed by the maximum length of the string. Integer values, such as the OpsInitiated counter, are declared with a C followed by the maximum value of the integer. In order to display both positive and negative integers, variables are declared with a G followed by the maximum value of the integer. Some fields need not be displayed as part of the ProxyStats Attribute group. Such attributes are declared with a K, which indicates that the relevant fields are to be skipped.

As seen in the previous section, proxy.dat would be populated by the attribute group ~ProxyMonitorStatFetch.

Graphs on Proxy Performance

Launch the TEPC using the steps shown in section Viewing Tivoli Monitoring data.

Using the data collected through the attribute group ProxyStats, a set of graphs can be drawn.

Click on the ProxyStats attribute group in the Left navigation to see the basic report for the collected data. It is in the form of a table. A bar chart can be plotted to see the completion rates of different operations:
  • Open the report for the ProxyStats attribute group, by clicking on the same in the navigator on the left.
  • Click the Bar Chart tool icon Bar chart and click on the Table view which contains the data to be plotted.
  • A dialog box will pop-up providing you the option of selecting the attributes that can be plotted in the bar chart.
  • Select the attributes of the type *Rate and click OK.
Adjust the graph properties using "Right click" -> "Properties" on the graph that's plotted, in the way described earlier.

Figure 10: Completion Rate Comparison
Completion Rate Comparison

In addition to the completion rate, users can also see the number of outstanding operations both with the proxy server as well as with the back-end servers. Historical data can be collected and analyzed to see how the proxy is doing over a period of time:

Figure 11: Historical data on Proxy Performance
Historical data

For getting the above view, click on the Plot Chart tool  Plot chart and then click on the report where you want to pick up fields for plotting the chart. Once that's done a popup will appear to select the set of attributes to be plotted. Select the attributes and click on OK to see the above graph. Refreshing the screen at a given point of time provides the plot of the chart till that point of time.



Back to top


Consolidated Replication Monitoring

The statistics on the replication topology at any given instant of time can be gathered using a set of operational attributes. The requisite operational attributes are passed to searches against the replication agreements.

A search on the replication context, with objectclass as ibm-replicationAgreement to fetch the pending change count, replication state and the replica URL, would yield the following results:

[root@lbmw ~]# ldapsearch -D <bindDN> -w <bindPW> -p 2389 -b o=ibm,c=us objectclass=ibm-replicationAgreement ibm-replicationPendingChangeCount ibm-replicationState ibm-replicaURL

cn=lbmw.in.ibm.com:389,cn=lbmw.in.ibm.com:2389,ibm-replicaGroup=default,O=IBM,C=US
ibm-replicaURL=ldap://lbmw.in.ibm.com:389
ibm-replicationPendingChangeCount=0
ibm-replicationState=ready

cn=lbmw.in.ibm.com:2389,cn=lbmw.in.ibm.com:389,ibm-replicaGroup=default,O=IBM,C=US
ibm-replicaURL=ldap://lbmw.in.ibm.com:2389

cn=lbmw.in.ibm.com:3389,cn=lbmw.in.ibm.com:389,ibm-replicaGroup=default,O=IBM,C=US
ibm-replicaURL=ldap://lbmw.in.ibm.com:3389

cn=lbmw.in.ibm.com:3389,cn=lbmw.in.ibm.com:2389,ibm-replicaGroup=default,O=IBM,C=US
ibm-replicaURL=ldap://lbmw.in.ibm.com:3389
ibm-replicationPendingChangeCount=0
ibm-replicationState=ready

cn=lbmw.in.ibm.com:6389,cn=lbmw.in.ibm.com:2389,ibm-replicaGroup=default,O=IBM,C=US
ibm-replicaURL=ldap://lbmw.in.ibm.com:6389
ibm-replicationPendingChangeCount=0
ibm-replicationState=ready

cn=lbmw.in.ibm.com:2389,cn=lbmw.in.ibm.com:6389,ibm-replicaGroup=default,O=IBM,C=US
ibm-replicaURL=ldap://lbmw.in.ibm.com:2389

cn=lbmw.in.ibm.com:1389,cn=lbmw.in.ibm.com:6389,ibm-replicaGroup=default,O=IBM,C=US
ibm-replicaURL=ldap://lbmw.in.ibm.com:1389

cn=lbmw.in.ibm.com:6389,cn=lbmw.in.ibm.com:1389,ibm-replicaGroup=default,O=IBM,C=US
ibm-replicaURL=ldap://lbmw.in.ibm.com:6389

As seen in the output above, we are getting the change count, replication status and the replica URL only for those agreements for which the server on port 2389 is the supplier (the server on which the above search was fired). For the rest of the agreements no data is returned. We would need to compile a list of all the replication agreements in the topology and fire the above query on the corresponding suppliers.

This task is achieved by a C program. The program will parse the output of a search like the one shown above, gather the change count and status and arrange them in a single line. The data pertaining to a given agreement will appear on a separate line. The replica URL would be used to fire recursive searches and get the pending change count and replication status for the other agreements in the topolgoy. On each line the supplier and the consumer would also be noted. All the fields would be separated by a semicolon (;). A single log file (repl.dat) would be used to dump the formatted results of the searches against all the suppliers in the topology. The Universal Agent would pick up the data from repl.dat.

The following assumptions are made for explaining the program details:

  • The LDAP URL of one of the suppliers in the replication topology is passed to the program.
  • The program dumps the consolidated replication statistics to repl.dat.
  • The program name is replTopology.c and the corresponding binary is named replTopology.

Here's the algorithm that replTopology.c should be based upon:
  1. Get the LDAP URL of the supplier. This is the one that the user passed in.
  2. Check if the program has already processed the LDAP URL. If YES, go to Step 8.
  3. Search for entries of the type ibm-replicationAgreement in the directory (under the given replication context) and from such entries fetch the attributes ibm-replicationPendingChangeCount, ibm-replicationState and ibm-replicaURL.
  4. From the search results pick the first entry.
  5. If the entry contains the requisite replication attributes, process the entry as given:
    • Parse the attribute values and append the same to repl.dat. The format of appending the results would be: "ReplContext;SupplierHostName:SupplierPort;ConsumerHostName:ConsumerPort;PendingChangeCount;QueueStatus"
      where,
      ReplContext is the replication context for which the data is being collected.
      SupplierHostName:SupplierPort is the host:port detail of the supplier.
      ConsumerHostName:ConsumerPort is the host:port detail of the consumer.
      PendingChangeCount is the number of changes pending between the above supplier and consumer.
      QueueStatus is the status of the replication queue.
    • Store the ibm-replicaURL in a data structure like a two dimensional array, since later this URL can be used to fire the next set of searches. Assume that the name of this data structure is urlList.
  6. If the entry doesn't contain the requisite replication attributes ignore the entry.
  7. If there are any further entries obtained in Step 3 which are yet to be processed go to Step 5.
  8. Get the next LDAP URL to be processed from urlList.
  9. If there is an LDAP URL to be processed, go to Step 2.
  10. If all the given LDAP URLs are processed, repl.dat should have the requisite information of the entire replication topology.

Here's how the repl.dat file will look like after the above procedure:

o=ibm,c=us;lbmw.in.ibm.com:6389;lbmw.in.ibm.com:2389;0 ;ready
o=ibm,c=us;lbmw.in.ibm.com:2389;lbmw.in.ibm.com:389;0 ;ready
o=ibm,c=us;lbmw.in.ibm.com:389;lbmw.in.ibm.com:2389;0 ;ready
o=ibm,c=us;lbmw.in.ibm.com:389;lbmw.in.ibm.com:3389;0 ;ready
o=ibm,c=us;lbmw.in.ibm.com:2389;lbmw.in.ibm.com:3389;0 ;ready
o=ibm,c=us;lbmw.in.ibm.com:2389;lbmw.in.ibm.com:6389;0 ;ready
o=ibm,c=us;lbmw.in.ibm.com:6389;lbmw.in.ibm.com:1389;0 ;ready
o=ibm,c=us;lbmw.in.ibm.com:1389;lbmw.in.ibm.com:6389;0 ;ready

Now the data is described to the Universal Agent. We start with the "//NAME" line, naming the attribute group ReplicationStats, giving it a type of P (polled) with a 90 second lifetime, and have the Universal Agent add a timestamp each time the file is read. The "//SOURCE" line declares the source of the data is a log file named repl.dat which copies recently polled data in the internal buffer with the "COPY" clause. The "COPY" clause basically indicates that the file be handled in the block mode. The data would be stored to an internal buffer named ReplStatus for further processing by another attribute group. The data is declared to be separated by semicolons:

//NAME ReplicationStats P 90 AddTimeStamp @ TDS Replication stats
//SOURCE FILE /opt/IBM/ITM/li6243/um/scripts/repl.dat COPY
//INTERNAL OUTPUT ReplStatus
//ATTRIBUTES ';'

After this we declare the type of each attribute value:

Attribute types for fetching replication status
ReplContextD1024
SupplierD1024
ConsumerD1024
PendingChangeCountC99999999
QueueStatusD1024

Display strings, such as the ReplContext string, are declared with a D followed by the maximum length of the string. Integer values, such as the PendingChangeCount, are declared with a C followed by the maximum value of the integer.

As seen earlier, repl.dat would be populated by replTopology. However, there needs to be a mechanism in place which would invoke replTopology periodically. This can be achieved by means of the following attribute group:

Attribute group for invoking replStatus
//NAME ~ReplStatusFetch P 60 AddTimeStamp @ TDS Fetch Replication Info
//SOURCE SCRIPT /opt/IBM/ITM/li6243/um/scripts/replTopology "ldap://lbmw.in.ibm.com:2389" Interval=60
//INTERNAL OUTPUT ReplStatus1
//ATTRIBUTES ';'
APP_VersionD50      
ReplicationAgreementD1024      
ReplicaURLD1024      
PendingChangeCountC99999999      
ReplicationQueueStatusD1024      

The attribute group used to do the actual search against the server is ~ReplStatusFetch. The ~ signifies that this is an invisible attribute group. It is just used for fetching the data and populating the repl.dat file. The actual work of displaying the data is done by the ReplicationStats attribute group. ~ReplStatusFetch is invoked in intervals of 60 seconds and the LDAP URL of any of the suppliers in the replication topology is passed as an argument to replTopology. The data fetched from that supplier is used to fetch the data pertaining to the other suppliers in the topology.

Graphs on Replication Statistics

Launch the TEPC using the steps shown in section "Viewing Tivoli Monitoring data".

Using the data that's collected through the attribute group ReplicationStats, a set of graphs can be drawn.

Here's the view of the ReplicationStats attribute group in the case there are no issues with replication:

Figure 12: Normal Replication Status
Normal replication status

The above report shows that everything is normal. Customer deployments can be complicated with 100s of supplier-consumer pairs. Having a single view of all the replication queues in the topology makes it easier for administrators to locate the problematic queue and consequently the problematic server.

Here are a couple of examples of the Report showing problems in the topology:

Figure 13: Replication status - Retrying
Retrying status of replication queues

In the above report, the server lbmw.in.ibm.com:389 is not able to replicate contents to the server on port 3389, for the replication context o=ibm,c=us. The current replication status for that queue is Retrying.

Figure 14: Replication status - Connecting
Connecting status of replication queues

In the above report, lbmw.in.ibm.com:389 is not able to replicate contents to the server on port 3389. The current replication status for that queue is Connecting. Same is the status of the agreement from port