230 Tivoli Business Systems Manager Version 2.1: End-to-End Business Impact Management
7.4 Creating a generic component
In this section we show how to create and define a new component using the
generic event interface. The example that we perform is very simple yet shows
the basic necessary actions.
First, define a generic software component within IBM Tivoli Business Systems
Manager. This will enable IBM Tivoli Business Systems Manager to receive the
specifically defined event from TEC and map its status onto an object, typically
an icon. To create this object we run the gemgenprod.sh command on the
database server. This command generates an extension to the TBSM database.
The syntax of the command is:
sh gemgenprod.sh [–S server][–U user][–P password] –m manufacturer –p product
–v version
where:
S server Specifies the name of the SQL server system
U user Specifies the SQL user ID to the SQL server system
P password Specifies the SQL password to the SQL server system
Web InfraStructure:
Apache
itmapache_tec_config_evtsvr.sh
CREATE new_rule_base path
rule_base_activation
itmapache_tec_config_evtsvr.sh
CREATE new_rule_base path
rule_base_activation
Web Infrastructure:
WebSphere
Application Server
WebSphere Event Tasks
Configure_Event_Server
WebSphere Application Server Utility
Ta sks
Send_WebSphere_Discovery_Events
_to_TBSM
Web Infrastructure:
Microsoft IIS
itmiis_tec_config_evtsvr.sh CREATE
new_rule_base path
rule_base_activation
./itmiis_tbsm_discovery.sh
Web Infrastructure:
iPlanet
WebLogic Event Tasks icon.
WebLogic_Configure_TEC
./itmiplanet_tbsm_discovery
Web Infrastructure:
WebLogic
WebLogic Event Tasks:
WebLogic_Configure_TEC
WebLogic Server Tasks:
WebLogic_TBSM_Discovery
Application: SAP mySAP Configuration Tasks
Configure Event Server
mySAP Configuration Tasks
Synchronize mySAP Objects on TBSM
Application: Siebel Siebel Event Tasks
Siebel_Configure_Event_Server_Job
Siebel Event Tasks
Siebel_TBSM_Discover_Job
Module TEC setup task TBSM disovery task
Chapter 7. TEC components integration 231
m manufacturer Specifies the manufacturer of the software component
p product Specifies the name product of the software component
v version Specifies the version of the software component
This script uses the manufacturer, product, and version to create the new object
according to the database structure defined in Chapter 3, Database structure
on page 77. From the script, the product field translates to that of the entry
prodname within the IBM Tivoli Business Systems Manager database.
We issue the command in Example 7-7 on the database server. During the
generation, the database is disabled, so you should stop all data sources before
running this command. Afterward, you can restart all data sources.
Example 7-7 gemgenprod command
gemgenprod -S ibmtiv5 -U sa -P XXXX -m “SAM” -P “generictest” -v “1.0”
After running this command, we run a SQL query to see what has been
generated in the IBM Tivoli Business Systems Manager database. The SQL
Query Analyzer displays the GEMLookupCID table, which contains information
about GEM-based classes in IBM Tivoli Business Systems Manager. The
manufacturer, product, and version columns contain unique information that
identify the component. It is shown in Figure 7-11.
Figure 7-11 GEMLookupCID content
We can see from the output in Figure 7-11 that a new entry has been created in
the database. Apart from this, a new set of tables and stored procedure were
created with the name of G02J.
232 Tivoli Business Systems Manager Version 2.1: End-to-End Business Impact Management
To activate the database changes, you must restart several affected IBM Tivoli
Business Systems Manager services:
? Agent listener
? Propagation Agent dispatcher
? Console server
Finally, associate an icon to this new class using the gemimageimport command.
There are two types, the large icon (32 by 32 pixels) and the small icon (16 by 16
pixels). The icon must be in the JPG or BMP format, and we import both as
shown in Example 7-8.
Example 7-8 Importing image icon
gemimageimport.sh -S ibmtiv5 -U sa -P XXXX -p generictest -v 1.0 -l -i
gentest_l.jpg
gemimageimport.sh -S ibmtiv5 -U sa -P XXXX -p generictest -v 1.0 -s -i
gentest_s.jpg
Now modify a rule within TEC to send these events to IBM Tivoli Business
Systems Manager. We use ITM to generate the events into TEC and write a new
rule to forward these events to IBM Tivoli Business Systems Manager.
Example 7-9 TEC to TBSM rule
/*==========================================*/
/* Rule to submit to TBSM */
/*==========================================*/
rule: tbsm_submit_generic:
(
description: 'do nothing except invoke IHSTTTEC which will’,
event: _event of_class _class
where [
hostname: _hostname,
source: equals 'TMNT',
origin: _origin,
modelname: _modelname,
severity: _severity,
msg: _msg
],
reception_action:
(
exec_program(_event,
'../../TDS/EventService/ihstttec','-b "%s" -i "%s" -q "%s" -p "%s" -s
"%s" -o "%s" -t "%s" -m "%s"',['generictest;1.0',_hostname, _origin,
_modelname, _severity, '22', 'EXCEPTION', _msg], 'YES')
Chapter 7. TEC components integration 233
)
).
This rule specifies that all events that arrive to TEC with the source equal to
TMNT (the standard source for an IBM Tivoli Monitoring event) will invoke the
exit ihstttec to send the state change information to IBM Tivoli Business
Systems Manager through event enablement. The full syntax of ihstttec can be
found in the Appendix of the
IBM Tivoli Business Systems Manager:
Administrators Guide
, GC32-0799. The -b parameter must match that of the
product name and version as created by the gemgenprod script in order to be
processed correctly by IBM Tivoli Business Systems Manager.
Now we will generate an event to see what happens. First, it is received by TEC
in a wtdumprl output, as shown in Example 7-10.
Example 7-10 Output from wtdumprl
1~306~65537~1038944076(Dec 03 13:34:36 2002)
### EVENT ###
TMW_HighProcesses;modelname="TMW_Processor";profilename="ITM511Profile#ibmtiv9-
region";event_key="Processor=0;";eventid="1872068515";severity="CRITICAL";hostn
ame="ibmtiv9";adapter_host="ibmtiv9";origin="9.3.4.59";highprocesses=
2.0000;idprocess= 3164.0000;percentprocessortime=
48.0000;process="[2]CMD";processor="0";date="12/03/2002 13:34:24 ";msg="High
CPU Usage, High CPU Usage User Priv, and High CPU Usage Process are exceeded on
the processor 0.";END
### END EVENT ###
PROCESSED
The wtdumptr command runs the task shown in Example 7-11.
Example 7-11 Output from wtdumptr
TASK;
server_handle=1;
date_reception=1038944076; # Dec 03 13:34:36 2002
event_handle=1;
task_number=140;
command='../../TDS/EventService/ihstttec -b "generictest;1.0" -i "ibmtiv9" -q
"9.3.4.59" -p "TMW_Processor" -s "CRITICAL" -o "22" -t "EXCEPTION" -m "High CPU
Usage, High CPU Usage User Priv, and High CPU Usage Process are exceeded on the
processor 0."';
start_time=1038944076; # Dec 03 13:34:36 2002
status=SUCCESS;
exit_status=0;
message=[ ];
234 Tivoli Business Systems Manager Version 2.1: End-to-End Business Impact Management
When the first event completes, an object is created under the hierarchy of
Enterprise - Network Region - Network Location - host, as shown in Figure 7-12.
Figure 7-12 New generic test object created
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.214.155