Wednesday, November 12, 2008

Scripts to start the TPAP components

These are the scripts used to start the TPAP (CCMDB, TAMIT) components:

startmw.sh
su - db2inst1 -c "db2start"
su - ctginst1 -c "db2start"
su - idsccmdb -c "db2start"
/opt/ibm/ldap/V6.1/sbin/32/ibmdiradm -I idsccmdb
/opt/ibm/ldap/V6.1/sbin/32/ibmslapd -I idsccmdb

startwas.sh
/opt/IBM/WebSphere/AppServer/profiles/ctgDmgr01/bin/startManager.sh
/opt/IBM/WebSphere/AppServer/profiles/ctgAppSrv01/bin/startNode.sh
/opt/IBM/WebSphere/AppServer/profiles/ctgAppSrv01/bin/startServer.sh MXServer

stopwas.sh
/opt/IBM/WebSphere/AppServer/profiles/ctgAppSrv01/bin/stopServer.sh MXServer -username wasadmin -password itsmswat
/opt/IBM/WebSphere/AppServer/profiles/ctgAppSrv01/bin/stopNode.sh -username wasadmin -password itsmswat
/opt/IBM/WebSphere/AppServer/profiles/ctgDmgr01/bin/stopManager.sh -username wasadmin -password itsmswat

stopmw.sh
/opt/ibm/ldap/V6.1/sbin/32/ibmslapd -k idsccmdb
/opt/ibm/ldap/V6.1/sbin/32/ibmdiradm -k idsccmdb
su - db2inst1 -c "db2stop force"
su - ctginst1 -c "db2stop force"
su - idsccmdb -c "db2stop force"

Monday, November 10, 2008

Explaining the Initialization mode in a TDI Loop

Very often with TDI, it's necessary to put a Loop in an Assembly Line, so that the Work Entries from the Feed can be used to perform another query to retrieve some data. An example is with Tivoli Application Depdendency Discovery Manager (TADDM) and obtaining all IP addresses for a ComputerSystem. The IP addresses are attributes of the IpAddress object, which is related to an IpInterface, which is then related to a ComputerSystem object, so in order to retrieve the IP addresses of a Computer System we need to correlate ComputerSystem, IpInterface and IpAddress.

To do that using TDI (avoid the need to process XML files or write Java code), we can use the TADDM Connector, available at: Tivoli OPAL

As the TADDM Connector allows to specify the depth of the query, our first inclination is specify depth=3, which would directly return all attributes from the ComputerSystems and related object in just one shot. This approach is great and simple, but puts a lot of work on TDI (and TADDM server) to retrieve all attributes of depth 3, which can easily turn to be thousands, for each Computer System. For an environment containing about 2500 servers, it took 15 minutes to retrieve the IP addressses and dump them in a very simple Assembly Line.

A second option is to read only the attributes of ComputerSystem (at depth 1), then put a Loop to retrieve the IpInterfaces, linking them to the ComputerSystem and reading at depth 2. The Assembly Line is a little bit more complicated, and the main problem is that the AL takes 36 minutes, instead of the previous version.

The reason for this performance degradation is the fact that TDI is re-initializing the connection to TADDM for every single ComputerSystem. Looking at the Loop, by default TDI uses Initialize and Select/Lookup as the Init Options, which means that the Connector is initialized every time. Changing it to Select / Lookup only leads to a running time of mere 6 minutes!

So take good care of your TDI Loop!

Eddie, so far no JavaScript code!

Friday, November 7, 2008

Splitting multi-valued variables in TDI

In many cases, we have an entry with multiple values (separated by comma, for example), and we need to split those values and process one at a time.

Assuming there is an entry with the following values:

10.4.128.24, 10.4.128.160, 10.4.128.161, 10.4.128.220, 10.4.128.227, 10.4.128.229, 10.4.128.231, 10.4.128.232, 10.4.128.209, 10.4.129.24

Here are the steps to process each value at a time:

  • In your AL, add a script component with the following code
    multiValued = work.getString ("MultiValued");

    task.logmsg ("multi valued: " + multiValued);

    tokenizer = new java.util.StringTokenizer (multiValued, ",");
    work.setAttribute ("values", null);

    while (tokenizer.hasMoreTokens ()) {
    token = tokenizer.nextToken ();
    task.logmsg ("value: " + token);
    work.addAttributeValue ("values", token);

    }
  • Add a Loop to your AL
  • In the Loop, select Attribute Value Loop
  • In the Work Attribute Name, type values (which matches the Work Entry defined in the code above)
  • In the Loop Attribute Name, type value
  • Inside the loop, you'll have the value Work Entry with a single value to process.
That's it!

Thursday, November 6, 2008

Script to launch ABBA with TADDM 7.1.2

TADDM 7.1.2 is coming soon, and the JAR files for the TADDM API have been consolidated into just one JAR (no comments on backward compatibility...). The tool works with TADDM 7.1.2; we just need to change the required JAR files, so here is a script to launch it with the new version:

export TADDM_SDK=/home/eduardo/Tivoli/TADDM/712/sdk/clientlib
java -cp bin/abba.jar:$TADDM_SDK/taddm-api-client.jar com.ibm.cmdb.tool.abba.ABBAGUI $*

By the way, this incredible tool can be downloaded from: http://www-01.ibm.com/software/brandcatalog/portal/opal/details?catalog.label=1TW10TA0X

Saturday, October 4, 2008

Launching TADDM in context without a GUID

TADDM certainly provides a cool way to be launched in a context, as documented at:

http://publib.boulder.ibm.com/infocenter/tivihelp/v10r1/index.jsp?topic=/com.ibm.taddm.doc_7.1/AdminGuide/r_cmdb_launchincontext.html

For example,

http://taddm_server:9430/cdm/servlet/LICServlet?guid=B435980E80FA39509EBFE294D70BA5C8

will launch TADDM Produce Console in the context of a GUID.

The problem arises when the launching application doesn't know the GUID.
I created a Java Server Page to bridge between such application and TADDM. It's available at:

http://docs.google.com/Doc?id=ddnnhc4w_307dffpq3gs
  • Download the file as taddm_launcher.jsp
  • Edit the line defining the TADDM_SERVER to your TADDM installation
  • Copy the file to the TADDM Server to the directory /deploy-tomcat/cdm
  • Point your browser to
    http://taddm_server:9430/cdm/taddm_launcher.jsp?name=computer_system_name
    replacing taddm_server and the computer_system_name accordingly
This work can certainly be expanded to launch other sections of TADDM and other kinds of resources (it works only with ComputerSystem objects).

The syntax of the Launch in Context URL can be found at:

Wednesday, September 24, 2008

Extending TAMIT ASSETNUM attribute field length

Here is the procedure to extend the size of the attribute ASSETNUM in the ASSET MBO in TAMIT:

  • Do a database backup
  • Go To-> System Configuration -> Platform Configuration -> Database Configuration
  • Object: ASSET
  • Select ASSET
  • Go to Attributes tab
  • Select ASSETNUM
  • Change the length to 32
  • The attribute will be in Change mode
  • Save it
  • Go to List tab
  • Select Action -> Managed Admin Mode
  • Click Turn Admin Mode On
  • Click Refresh Status until Admin Mode is ON
  • Connect to TPAP DB
  • db2 drop trigger multiassetloccip_u
  • db2 drop trigger multiassetloccip_t
  • Select Action -> Apply Configuration Changes
  • Check Do you have a current backup?
  • Click Start Configuring the Databsase
  • Click Turn Admin Mode OFF

Thursday, September 18, 2008

TDI class material

These are the links for the material used in the TDI class in Charlotte on Sep 18 - 20, 2008

Source CSV file: http://spreadsheets.google.com/pub?key=p4p_qEbMe9m6VL-TWV1NyQQ
Lab instructions: http://docs.google.com/Doc?id=ddnnhc4w_2793ph5zxcg
Presentation: http://docs.google.com/Presentation?id=ddnnhc4w_54f9tnwmd2

Wednesday, September 10, 2008

How to configure TADDM 7.1.1 to run BIRT reports

1. replace the reports.xml in dist/etc/cdm/xml
2. replace the dist/deploy-tomcat/cdm/WEB-INF/view/dm_newsummary_sidebar.jsp with the one here
3. untar birt-viewer.tar to dist/deploy-tomcat/
4. restart the server
5. Login to domain manager and you shd see the BIRT reports icon with a list of reports under the Analytics section

These files are available at: http://www.megaupload.com/?d=N1VTT5LT

Friday, September 5, 2008

Exporting data from TADDM

It's very simple to extract data from Tivoli Application Dependency Discovery Manager (TADDM), using Tivoli Directory Integrator (TDI) and the TADDM Connector, available at:

TADDM Connector at Tivoli OPAL

Using the TADDM Connector, you just specify the TADDM configuration information (host name, user, password, CI type), then drag and drop the fields into the desired Connector (for example, a CSV file, using the FileSystem Connector).

Wednesday, August 13, 2008

Setting the JDBC Transaction Isolation Level in TDI

As the JDBC Transaction Isolation needs to be set in the client side, I asked my Norwegian friends how to do it. As always, Eddie had the answer:

So you should have this option from TDI:

myJDBConnector.getConnector().getConnection().setTransactionIsolation( desiredLevel_int );


The Connection JavaDocs have this to say:


setTransactionIsolation
public void setTransactionIsolation(int level)
throws SQLException
Attempts to change the transaction isolation level for this Connection object to the one given. The constants defined in the interface Connection are the possible transaction isolation levels.
Note: If this method is called during a transaction, the result is implementation-defined.
Parameters:
level - one of the following Connection constants: Connection.TRANSACTION_READ_UNCOMMITTED, Connection.TRANSACTION_READ_COMMITTED, Connection.TRANSACTION_REPEATABLE_READ, or Connection.TRANSACTION_SERIALIZABLE. (Note that Connection.TRANSACTION_NONE cannot be used because it specifies that transactions are not supported.)

Throws:
SQLException - if a database access error occurs or the given parameter is not one of the Connection constants
See Also:
DatabaseMetaData.supportsTransactionIsolationLevel(int), getTransactionIsolation()
You will need to do this for each JDBC Connector with its own connection.

Saturday, June 7, 2008

Creating Business _____ in an IBM Service Management solution

After doing many, many engagements with Tivoli's discovery tool (TADDM), one issue that always pops up where a business application/service/system should be defined.

Although TADDM has the capability of discovering the components of a business applications (the database servers, web servers, etc), and provides some basic ways to create business application (application template, application descriptor or individually selecting the components), TBSM claims to have better ways to create them.

I admit I'm not an expert in TBSM, and the lawn on the other side of the fence always seems greener, here are the problems I see:

  • Assuming TBSM indeed has a better mechanism to associate CIs to Business Services, how can TBSM provide this information back to TADDM and CCMDB, so that these products can consume the BA definition for impact assessment, topology, etc ?
  • The current strategy is to have TADDM as the discovery tool, populating CCMDB, which will perform the Change and Configuration Managements. If TBSM is the creator of the Business Application (or Service), the customer is required to have another problem in the solution architecture, just to create the BAs.
As the lawn in TBSM's backyard seems greener, shouldn't TBSM provide a component TADDM (or CCMDB) can use to create the Business Applications?

By the way, I created a small tool, called Automated Builder of Business Application, inspired in the old TBSM 3.1 ABS that traverses the dependencies of a certain CI and associated the entire connected graph to a Business Application. Take a look and see what you think...