ITMv6 Process string length limitation

My PMR to IBM Tivoli support

I’d be surprised if there wasn’t already an ER for this, but if you
don’t mind, please submit one.

Do you know if anybody else has asked or criticized this major
limitation.

Its hard to believe that there isn’t something that emulate what a
simple one line script would accomplish.

In the ER, I would expect support for perl regex pattern, where patterns
can be indexed to return the matching index as a displayable value.

match process string against /opt/IBM*\s+(\S+java*\)s+server1 pattern and return pattern matching (\S+java*\)

IBM’s Response

Yes, we already have an ER opened for this case, please note down the
request number: MR0108092213

****

ITM 6 has limitations when monitoring processes.

Customer needs to monitor processes with very long names, in this case
the WebSphere NodeAgent process with 4999 characters. The unique string
“nodeagent” is at the very end of the process name and the Unix OS agent
cannot find this process: The attribute command_name is limited to 100
characters and for command_name_U to 768 Bytes.
Cust needs a possibility to monitor such long process names using the
standard ITM 6 OS agent.

****

It is already a recognized request. You can follow up on the progress of
the request with your IBM Rep. Please let me know if you have any other
questions.

IBM Tivoli Monitoring Product Codes

Obtaining Product Codes for IBM Tivoli Monitoring (ITM v6)

I parse the proddsc.tbl file on a UNIX/Linux system to get the list by doing this:

UNIX

awk -F\| '/^[^*#]/ {print $1,$2}' ${CANDLEHOME}/registry/proddsc.tbl | sort | uniq

Or, IBM’s site http://www-01.ibm.com/support/docview.wss?rs=2366&context=SSZ8F3&dc=DB520&dc=DB560&uid=swg21265222&loc=en_US&cs=UTF-8&lang=en&rss=ct2366tivoli

ITM Logs Timestamp Conversion

ITM v6 log files use a hexadecimal timestamp (to save space? who the hell knows), which adds unnecessary effort when the reason you’re looking at the logs is to determine an issue in the first place. In any case…

Here’s the script I wrote when I first encountered the nonsense in ITM v6 logs a few years ago:

#!/bin/perl

foreach (<STDIN>) {
 if (/^[^\s\d\w]+([\w\d]*)/) {
  @t=localtime(hex($1));
  $time=sprintf("%02d:%02d:%02d %02d/%02d/%04d",
  $t[2],$t[1],$t[0],$t[4]+1,$t[3],$t[5]+1900);
  s/^[^\s\w\d]+[\w\d]*/$time/;
 }
  print $_;
}

Here’s a one-liner that Venkat.Saranathan at Gulfsoft.com cranked out, rending my script pretty much obsolete

perl -lane 'if ($_ =\ /^(.)([\dA-F]+)(\..*)/) { printf "%s%s%s", $1, scalar(localtime(oct("0x$2"))),$3; }'

ITM Host Availability (ping attribute)

Synopsis

A nice feature which isn’t publicized too much in ITM for Linux and Unix agents is the ping capability.

They’re refrerred to as “Host Availability” for Linux and “Ping Attributes” for Unix

Both will accept an input file containing a list of servers to “ping”, and both will return status and response time.

Enabling the ping hosts file

Linux

$CANDLEHOME/config/lz.ini: KLZ_PINGHOSTLIST=<path_to_list>
# e.g. KLZ_PINGHOSTLIST=$CANDLEHOME/config/my_hostlist
# Add this to the lz.config if you want to avoid having to reconfig the agent

Unix

$CANDLEHOME/config/ux.ini: KUX_PINGHOSTLIST=<path_to_list>
# e.g. KUX_PINGHOSTLIST=$CANDLEHOME/config/my_hostlist
# Add this to the lz.config if you want to avoid having to reconfig the agent

Extra feature difference

One minor, but important, difference is that the Linux component will only ping servers in the list, while the Unix component has the additional feature using a situation to ping any target host from any managed system.

This makes every managed system (agent) a ping source to target critical servers.

Attribute Group: UNIX Ping
Situation Definitions: System_Name == $NODE$, Target_Host == webserver1

ITM v6 Gripes (Missing functionality)

As a Tivoli consultant, I’ve had to tweak, torque and tune ITM v6 to fulfill requirements not met out of the box. Several of my clients have felt ripped off by IBM for having paid for a product billed as covering best practices out of the box, only to discover, there is significant development costs involved.

I’m going to itemize and update the shortcomings as I think or run across them, and in all fairness, update if ITM fills the void.

Situations

  1. Attributes, values and situation specific data is not passed to the ‘Take Action” command
    • Typically this is passed in the shell’s environment
    • However, these important pieces of info ARE passed to the EIF
  2. Inability to determine what situations are running on which systems, or reversed, inability to derive which situations are running on any particular system

Windows Agent

  1. No regular expressions for directory/file matching

Unix Agent

  1. No regular expressions for directory/file matching (Unix and Linux)

Oracle Agent (ITMfDatabases)

  1. (<= v6.2.0) Does not detect listeners if dynamically configured

Quick and Dirty LAMP

Installing a LAMP stack: Linux – Apache, PHP, and MySQL on Fedora Core

Assuming you already have Linux and Yum installed.

1. Install Apache (httpd), PHP, MySQL (server and client), and the component that allows
php to talk to mysql.

 yum -y install httpd php mysql mysql-server php-mysql

2. Configure the new services to start automatically

  /sbin/chkconfig httpd on
  /sbin/chkconfig --add mysqld         [this is not required with FC4 and above]
  /sbin/chkconfig mysqld on

  /sbin/service httpd start
  /sbin/service mysqld start

3. IMPORTANT! Set up the mysql database root password. Without a password, ANY user on the box can login to mysql as database root. The mysql root account is a separate password from the machine root account.

 mysqladmin -u root password 'new-password'           [quotes are required]

4. Make additional security-related changes to mysql.

 mysql -u root -p

 mysql> DROP DATABASE test;                            [removes the test database]
 mysql> DELETE FROM mysql.user WHERE user = '';        [Removes anonymous access]
 mysql> FLUSH PRIVILEGES;

5. Following the above steps, the document root for Apache is /var/www/html/

Create a test PHP script (such as phpinfo.php) and place it in the document root. A useful
test script sample:

 <?php
    phpinfo();
 ?>

6. Create a database and database user for your data. You will use this database and user name
in your database connection string. The GRANT statement actually creates a new MySQL user account.

 mysql> CREATE DATABASE web_db;
 mysql> GRANT ALL PRIVILEGES ON web_db.* TO 'web_user'@'localhost' IDENTIFIED BY 'thepassword';

Windows Ports

I was experimenting with WAMP on my laptop, not a big deal in itself, but when I rebooted the Apache server failed to start.

Event logs showed something else had already been binded to port 80.

Quick Fix was to determine which PID had it by running the following:
netstat -ano
From there you can use task manager, determine the conflicting process, kill the PID.

(If you had CYGWIN installed)
netstat -ano | grep :80
ps -Wef | grep <pid> # To determine the process
kill -9 <pid>

ITM TDW Schema

Not that there is a lot to the TDW layout, but knowing the schema assists in the documentation process and developing queries and procedures of the TDW (Tivoli Data Warehouse).

Make short work of this by using the opensource tools of SchemaSpy and Graphviz

SchemaSpy is a jar file that supports over 21 DBs, including the 3 supported by ITM TDW (Oracle, Sybase, MSSQL) and is run from the command line to generate a html directory of content about the interrogated schema.

jdsmedia@deant61p /usr/local/bin
$ java -jar ./schemaspy.jar -t ora -db testtdw -s ITMUSR -dp c:\\OraClient11g\\jdbc\\lib\\ojdbc5_g.jar -u XXX -p XXX -o c:/cygwin/tmp/tdw

Using database properties:
[./schemaspy.jar]/net/sourceforge/schemaspy/dbTypes/ora.properties

Connected to Oracle – Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 – 64bit Production

With the Partitioning, OLAP and Data Mining options

Gathering schema details………………………………………………..
……………………………….

ITM Agent(aka:TEMA) for Omnibus fails to install in $CANDLEHOME

Par for the course with IBM Tivoli’s porting of aqcuired products and their attempt at integrating them together, the ITM Agent for the a Netcool’s Omnibus  does not install in the expected $CANDLEHOME.

IBM has opened an enhancement request based on the PMR I opened. My workaround below.

Problem title
TEMA for Omnibus does support optional $CANDLEHOME paths
.
Problem description Continue reading ‘ITM Agent(aka:TEMA) for Omnibus fails to install in $CANDLEHOME’ »

“Smart um_cleanup”

DOWNLOAD:  

The ‘um_cleanup’ script that comes with ITM6 Universal Agent I’m convinced was written by an intern or co-op who just learned the basics of scripting.

I “rewrote” the whole darn thing with the following comments and syntax:

um_cleanup_jds.ksh -h
USAGE: um_cleanup_jds.ksh [UA|CMS|CNPS|ALL]

um_cleanup_jds.ksh -f

You need only supply a single arg - the component or force

where

-f is only required if NO ARGS are supplied

no args assumes ALL and prompts unless '-f'

This is a cleaned up version of the 'um_cleanup' script provided

with ITM6.x. It'll figure out the variables as a half-way decentprogram should.

#############################################################################

# Modified by Jim Sander : jimsander@jdsmedia.net

# Date: 03.20.09

# Laziest damn script fix up

# - there's no reason why somebody in the automation business

# needs to be pluggin in specific variables for an already 'shotgun'

# approach.

# - Added simple iterative loops to run down every friggin

# working path

# - The ONLY required input value should be the 'CLEANOPT'

# and it should take a list

# - no args assumes 'ALL' and prompt or force option

# - take an individual arg

# - TEMSNAME is only used on a TEMS (so why do they expect you to do

# provide it on every component

#############################################################################