Installing and configuring the ODBC gateway

The Tivoli Common Reporting report pack for Netcool/OMNIbus is a useful tool for generating management information and can be a useful source of data when it comes to understanding the profile of alerts being handled by the event management infrastructure.

The reports use a REPORTER database as the data source and in line with the free nature of TCR, the ODBC gateway used to populate this database is provided without additional charge when used solely for TCR reporting purposes.

Getting the ODBC gateway up and running can be troublesome, so this tip provides a guide to installing and configuring the ODBC gateway on a CentOS 5.0 server, using DB2 V9.5 to host the REPORTER database.

Configure Users

The first step is to create the user that the ODBC gateway will run under.

Create a group called ncgroup

groupadd ncgroup

Create a group called ncoadmin

groupadd ncoadmin

Create a user called netcool

useradd -g ncgroup –G ncoadmin netcool

Set the netcool user password

passwd netcool

Create /opt/netcool and assign netcool as the owner

mkdir /opt/IBM/tivoli

chown netcool:ncgroup /opt/IBM/tivoli

Installing the ODBC gateway

Now log in as or su to the newly created netcool user.

Using the Netcool/OMNIbus 7.3 installation media, perform a Typical install (although this installs some additional components that aren’t going to be used it does ensure that all the required library files are present).

export NCHOME=/opt/IBM/tivoli/netcool

export OMNIHOME=$NCHOME/omnibus

export PATH=$PATH:$OMNIHOME/bin

The gateway code is provided as “Netcool/OMNIbus Gateway for ODBC(nco-g-odbc 5_0) “, the part number for Linux is CZ8LIEN.

Extract the tar file into a temporary directory (e.g. /tmp/odbc).

Launch the installer with the following command:

$NCHOME/omnibus/install/nco_install_integration

1/ When prompted, point the installer at the temporary directory and click Next

2/ Accept the license and click Next

3/ Click Install

Configure odbc.ini

Copy $OMNIHOME/platform/linux2x86/odbc.ini $OMNIHOME/etc

In the [ODBC Data Sources] section, remove all lines apart from the DB2 entry.

In the [DB2] section, make the following changes:

Driver=/opt/IBM/tivoli/netcool/omnibus/platform/linux2x86/lib/BMdb223.so

IpAddress=<database server>

Database=REPORTER

TcpPort=<database port e.g. 50000>

In the [ODBC] section make the following changes:

TraceDll=/opt/IBM/tivoli/netcool/omnibus/platform/linux2x86/lib/odbctrac.so

InstallDir=/opt/IBM/tivoli/netcool/omnibus/platform/linux2x86/lib

The resulting file should look something like:

[ODBC Data Sources]

DB2=DataDirect 5.3-SP1 DB2 Wire Protocol Driver

 

[DB2]

Driver=/opt/IBM/tivoli/netcool/omnibus/platform/linux2x86/datadirect-5.3-SP1/BMdb223.so

Description=DB2

LogonID=uid

Password=pwd

DB2AppCodePage=1208

ServerCharSet=1252

IpAddress=alpha

Database=REPORTER

TcpPort=50000

Package=package

Action=REPLACE

QueryBlockSize=8

CharSubTypeType=SYSTEM_DEFAULT

ConversationType=SINGLE_BYTE

CloseConversation=DEALLOC

UserBufferSize=32

MaximumClients=35

GrantExecute=1

GrantAuthid=PUBLIC

OEMANSI=1

DecimalDelimiter=PERIOD

DecimalPrecision=15

StringDelimiter=SINGLE_QUOTE

IsolationLevel=CURSOR_STABILITY

ResourceRelease=DEALLOCATION

DynamicSections=32

WithHold=0

Trace=0

[ODBC]

Trace=0

TraceFile=odbctrace.out

TraceDll=/opt/IBM/tivoli/netcool/omnibus/platform/linux2x86/lib/odbctrac.so

InstallDir=/opt/IBM/tivoli/netcool/omnibus/platform/linux2x86/lib

UseCursorLib=0

Configure nco_g_odbc.props

Edit $OMNIHOME/gates/nco_g_odbc/nco_g_odbc.props

We need to enter the user details that the gateway will connect to the REPORTER database with. The username should be defined as   ‘username@data source’, the data source in this case being DB2. The password should be encrypted using the nco_g_crypt utility.

# Authentication details for the target database

ODBC.UserName :   ‘db2inst1@DB2’>;

ODBC.Password : ‘DIEAFHAMBIFLGLCC’

The hard and soft limit regions, which control how much memory and disk space the gateway uses, also need to be configured. The values for these will depend on the event throughput but as a starter try the following settings:

Gate.RegionSoftLimit : 80

Gate.RegionHardLimit : 400

Gate.RegionSoftLimitInc : 5

Configure startup

Edit the file $OMNIHOME/gates/nco_g_odbc/nco_g_odbc.startup.cmd to enable the startup transfers by uncommenting the following lines:

TRANSFER FROM ‘alerts.conversions’ TO ‘REPORTER_CONVERSIONS’ DELETE USING TRANSFER_MAP ConversionsMap;

TRANSFER FROM ‘alerts.objclass’ TO ‘REPORTER_CLASSES’ DELETE USING TRANSFER_MAP ObjectClassesMap;

TRANSFER FROM ‘master.groups’ TO ‘REPORTER_GROUPS’ DELETE USING TRANSFER_MAP GroupsMap;

TRANSFER FROM ‘master.members’ TO ‘REPORTER_MEMBERS’ DELETE USING TRANSFER_MAP MembersMap;

TRANSFER FROM ‘master.names’ TO ‘REPORTER_NAMES’ DELETE USING TRANSFER_MAP NamesMap;

Update the interfaces file

The last step in the gateway configuration process is to update the interfaces file using nco_xigen or equivalent in order to add an entry for the relevant ObjectServer(s).

Create the REPORTER database

With the gateway configured, the final step is to create the REPORTER database, which is the destination for the archived alerts. The scripts to create the database are provided as part of “Netcool/OMNIbus Gateway Configuration Files and Scripts for Tivoli Data Warehouse (nco-g-tdw-scripts)”. The part number for Linux is CZ9K8EN.

Extract the tar file into a temporary directory (e.g. /tmp/tdw).

Launch the installer with the following command $NCHOME/omnibus/install/nco_install_integration

When prompted, point the installer at the temporary directory and click Next

Accept the license and click Next

Click Install

The creation scripts are now located in $OMNIHOME/gates/tdw/db2.

Log in as or su to a DB2 administrator user e.g. db2inst1

Run the script

db2 -td@ -vf db2.reporter.sql

The gateway can now be started with the command nco_g_odbc.

The Netcool/OMNIbus report pack can be downloaded from OPAL (  http://www-01.ibm.com/software/brandcatalog/opal/details?catalog.label=1TW10NC2G)

Visits: 234