Saturday, March 15, 2008

Simple Postemsg-like solution for ITM 6.x

Posted by: venkat on Jan 23, 2008 - 09:44 PM

One of the most convenient features of classic Tivoli event adapter is the postemsg command. Using this you can send custom events to TEC from your scripts/CLI. In ITM 6.1, there is no such equivalent command available though one can design such a solution in just three steps. This article discuss a way to setup postemsg like solution in ITM 6.x

Overview


The idea is to use gbscmd sendmessage command to write a custom message to ITM Universal Message Console and develop a situation to forward any messages written to Universal Message Console.

Step 1: Create a situation


Now develop a simple situation to forward Universal Message Log entries with the following formula. Hint. Create a situation under "Tivoli Enterprise Monitoring Server".

(Originnode == AND Category == GBSMSG)

It is important to include "Originnode" in your condition. Otherwise, the situation will not fire. Distribute the situation to *HUB. Associate and start the situation.

Step 2: Write to Universal Message Console using Gbscmd


You can send a message to Universal Message Console using the following command.

gbscmd sendmessage --auth --message "some test message" --category "GBSMSG" --severity 2

Step 3: Verify the results


Ensure that the message appears in Situation Event Console and if you have Netcool/TEC Integration enabled, the message should also appear in the respective consoles.

Posted by Venkat Saranathan

Testing database connectivity using JDBC

Posted by: venkat on Dec 28, 2007 - 09:20 PM

Many a time, you might want to test if you could connect to a database or not. The simplest way is of course having a database client installed and use it. However, this method may not be possible in all cases. For example, on an ITM warehouse proxy, you'll have only Db2 JDBC type 4 drivers, (which are nothing but two files, db2jcc.jar and db2jcc_license_cu.jar). How do you test connectivity on such systems? Here is a Jython script.

Why Jython?


In addition to the self-serving opportunity of me learning Jython, Jython can reuse the same JDBC drivers that TDW uses. So there is no need to setup Perl DBI or database client. We could write the code in Java, but that's an overkill because of compilation requirements. Setting up Jython is very easy. Please refer to this page for detailed installation steps.

Code


Here is the sample code. Just be sure to change the connection settings.

Note: Do NOT cut-paste the code from below listing. Jython, like python, is sensitive to tabs. So, download the code by clicking here.

from com.ziclix.python.sql import zxJDBC
import java.sql

conn = "jdbc:db2://server:50000/warehous"
user = "user"
passwd = "passwd"
driver = "com.ibm.db2.jcc.DB2Driver"

try:
db = zxJDBC.connect(conn, user, passwd, driver)
print "Connection successful"
except zxJDBC.DatabaseError, e:
print "Connection failed:", e

TPM 5.1.1 Documentation

Posted by: martinc on Dec 21, 2007 - 04:55 PM

IBM has provided a document on the components to download for install and updated the Info-Center
Download information http://www-1.ibm.com/support/docview.wss?rs=1015&uid=swg24017302

There is information for all the OS platforms, you just have to scroll down. For some reason it is not quite set up like previous pages. Oh well.

Info Center: http://publib.boulder.ibm.com/infocenter/tivihelp/v20r1/index.jsp

TPM 5.1.1 is now available

Posted by: martinc on Dec 21, 2007 - 02:46 PM

The Christmas present everyone was waiting for :)
So what is new and improved?

The biggest focus on the new version was the installer. Anyone who has tried to install TPM 5.1 knows that it just did not work. I know that installs for me were < 50% successful on the first try. Even with the exact same VM images from attempt to attempt. In the new version, I did not have a failure on the 4 times that I installed. Sweet!

There is also more support for different topologies. In the previous version, getting TPM to use a remote database was a post install step. Now it is part of the installer.

Some of the new features are:
Agent less inventory scanning - there is no longer a requirement to have the agent installed on a system to perform an inventory scan. The scan will copy the required files to the target, initiate the scan and return the results to the DCM

Web Replay - This was available in a "beta" in 5.1 but is now part of the install. Web replay allows for some automation of tasks. Some tasks within TPM take many steps to complete and for the most part do not require any input. A recording of the steps can be done to "automate" some steps and stop at prompts for others.

Unknown device management - When discovering devices and an error is encountered, the device is dropped and not recorded in the DCM. Now the device will be recorded but will require some manual steps to complete the discovery. This is useful when a device is discovered but the user name and password are not correct. A new discovery can be done with the correct information on the unknown device.

Enhanced Discovery - When discovering SMB or SSH devices, the discovery can be done in one discovery configuration rather than two separate discovery configurations. This is mainly a time saver so that the same subnet does not need to be scanned twice.

There have also been many changes in the user interface to improve performance and readability.

My Comments
So far I have been pretty impressed by the installer and some of the changes made to the interface. I know that the agent less inventory scanning has been something that people were asking for and it does work! As I said before, the installer did work very nice. One of the big changes in the install is that by default it only uses local OS authentication (much like the fast start install). There is documentation and scripts to allow for easy configuration of TDS or MSAD (read only).

I will get some screen shots and other comments in the new year.

So Merry Christmas and Happy New Year!

Martin

Friday, March 14, 2008

Tivoli Common Reporting (TCR) uses the ZeroG InstallAnywhere installer

While many Tivoli products use the InstallShield Multi-Platform (ISMP) installer, TCR uses Zero G installer.

This little difference is important if you want to reinstall the product. Specifically, ISMP uses the vpd.properties file as its installation registry. Zero G, on the other hand, uses a file named .com.zerog.registry.xml (notice that it begins with a dot, so it's a hidden file). So if you need to delete the product and start over, you need to edit or delete this file, also. If you only remove the install directory, when you run the installer, it will just tell you that Tivoli Common Reporting is already installed, and won't reinstall it.

Using BIRT for TDW Reporting

There has been alot of interest in BIRT lately with the release of Tivoli Common Reporting 1.1.1 to GA, so I'm posting a link to part of my TUG presentation on using BIRT..

TUG BIRT Presentation

Actually searching all files when searching for text

For quite a while I have always been annoyed by the search in Windows. I thought it was great that you could use the search to look for text inside a file, just like grep. Of course in usual Microsoft fashion, search all files does not mean to actually search all files.

So finally I became so annoyed with this, I went to see if there was a solution.

I did find the solution and I thought I would share the link
Using the "A word or phrase in the file" search criterion may not work

Hope this helps someone.