Saturday, March 8, 2008

Creating TEC workspace in ITM

The Tivoli Enterprise Portal (TEP) provides rich visualization out of the box, and with the Enterprise Console workspace plug-in, network and other non-ITM events can be managed from one interface. With a combination Universal Agent and TEP ODBC query you can create a TEC centric workspace to view TEC events and monitor TEC itself.



The TEC reception log is the first place that administrators look for problems with TEC. Are there any queued or waiting events. Are events sent to TEC without the proper BAROC files loaded or are they not formated correctly.

Here is an example of a Universal Agent that uses ODBC to collect reception log metrics. The SQL is DB2 syntax, but with a little work can be applied to any of the supported database types.


//APPL TEC_ODBC_Query
//NAME TEC_ReceptionLog_Event_Status P 300 Interval=60
//SOURCE ODBC tec user=tec_user pswd=password maxrows=10
//SQL select sum((case when status = 1 then 1 else 0 end)) as 'WAITING',sum((case when status = 2 then 1 else 0 end)) as 'PROCESSED',sum((case when status = 3 then 1 else 0 end)) as 'QUEUED',sum((case when status = 4 then 1 else 0 end)) as 'PARSE_FAIL',count(status) as 'EVENTS' from tec_t_evt_rec_log

//ATTRIBUTES
PROCESSED C 32
QUEUED C 32
WAITING C 32
PARSE_FAIL C 32
EVENTS C 32
P_PROC (PROCESSED % EVENTS)
P_QUEUED (QUEUED % EVENTS)
P_WAITING (WAITING % EVENTS)
P_PARSE_FAIL (PARSE_FAIL % EVENTS)


The P_* attributes are derived values that are used provide data for the pie chart. And the raw attributes provide the event count summary.

In order to provide the data for the Parse Failed Events table, you can create a query that uses an ODBC connection to the TEC database to pull in the parse failures:

select dateadd(ss,date_entry,'01-01-1970 00:00:00') as recieved,
isnull(short_message,long_message) as event ,
isnull(commnt,'') as comment
from tec_t_evt_rec_log
where status=4


Again, this is DB2 SQL, but similar date manipulation tricks exist to convert the epoch time to a human readable format.


No comments: