ITM 6 EIF Integration Event Class Customisation
ITM EIF integration has been available since the original ITM 6.1 version, however, the administration of the integration, and specifically the events generated by ITM has been greatly improved with ITM 6.2 and subsequent releases.
ITM 6.2 added the facility to define multiple target EIF receivers, for example multiple TEC Servers and/or Tivoli EIF Probes (for integration with Netcool/OMNIbus). Additionally, the situation editor was updated to include an EIF tab to enable the administrator to identify whether to generate an EIF event from the situation event, and if so the severity of that event and one or more target EIF servers. These options are demonstrated in the figure below.
ITM 6.2.1 has further extended the customisation options, enabling the administrator to select the Event Class of the generated event and the content of the event attributes (slots). These options are accessible from the EIF Slot Customization button visible in the above figure. However, by default the only event classes available for selection are those shipped with the core ITM product.
This article details how custom event classes can be added to the Event Class Selection list, a common requirement, for example, when developing custom agents with the Agent Builder.
The default event classes made available for selection from the situation editor Event Class Selection dialog can be overridden through the use of an XML file. The XML file defines the event class names, attributes and hierarchy and must be loaded by the TEP Server through the use of an environment variable.
The content of the XML file is complex, but luckily IBM provide a tool to assist with the generation of the file. The tool is known as the Tivoli Enterprise Console Event Definition Generator, or TEDGEN. The basic procedure for customising the list of Event Classes available from the Event Class Selection dialog is as follows:
- Install the TEDGEN tool on the TEC Server
- Load the BAROC files defining the custom Event Classes into a local rulebase
- Use the TEDGEN tool to generate an XML file
- Copy and load the XML file on the TEP Server
Each of these four steps will be detailed in the following sub-sections.
The TEDGEN tool is a collection of files available on the ITM 6.2.1 Tools DVD (part number C1MP9EN). The files are located in the sub-directory /tec/tedgen of the media. Installation is a simple mater of copying the directory tedgen to the TEC Server and adding the directory tedgen/tools to the local path.
For example, on a Windows TEC Server, run the commands:
xcopy /s X: ec edgen C:Tivoli edgen
setx PATH "%PATH%;C:Tivoli edgenscripts"
Loading the BAROC Files
BAROC files define the Event Classes and thier hierarchy and are loaded into a TEC Server rulebase using the standard TEC command wrb. For example, to load the baroc file /tmp/k00.baroc, created by the Agent Builder for a new agent, into the rulebase ITM621_RB run the command:
wrb -imprbclass C:/tmp/k00.baroc ITM621_RB
Generating the XML File
The XML file is generated using the tedgen command/script (dependent on the platform). There are a number of available options for this command, as indicated by the syntax below:
tedgen [-bcDir <baroc_classes_directory> | -rbName
<rule_base_name>] -id <server_id> -xmlPath
- bcDir: optional, defining the directory containing the baroc files
- rbName: optional, identifying the rulebase from which to extract the class definitions
- id: A string identifier for the TEC Server
- xmlPath: path and name for the output XML file
Note: if both the options bcDir and rcName are ommitted, the event classes from the loaded rulebase are added to the XML file.
For example, to create an XML file /tmp/event_classes.xml from the event classes loaded in the TEC Rulebase ITM_621, run:
C:>tedgen -rbName ITM621_RB -id ITM_TEC -xmlPath /tmp/event_classes.xml
C:>"C:Tivoli inw32-ix86TMETECjre injava.exe" -Djava.util.logging.
.file=Tivoli edgenscripts edgenlog.properties -classpath "C:Tivoli i
ix86..generic_unixTMETEC ec_rb.jar;C:Tivoli inw32-ix86..generic_
tedgenscripts..jar edgen.jar;" com.tivoli.tec.tedgen.TedGenerator -rbN
M621_RB -id ITM_TEC -xmlPath /tmp/event_classes.xml
Parsing C:CustomRulesbaseITM621_RBTEC_CLASSES oot.baroc
Parsing C:CustomRulesbaseITM621_RBTEC_CLASSES ec.baroc
Output XML file generated with success.
Note that this process adds all of the Event Classes defined in the selected rulebase to the XML file. This is likely to be many more event class definitions than require, or desirable. The administrator has the option of editing the XML file directly to remove the superfluous classes, or, preferably creating a rulebase specifically for the purpose of generating the XML file, where the rulebase has a subset of the production rulebase event classes.
Loading the XML File
The generated XML file must be copied to the TEP Server and loaded using the environment variable KFW_MCS_XML_FILES. This environment variable must be added to the file %CANDLEHOME%CNPSKFWENV on Windows or $CANDLEHOME/config/cq.ini on UNIX/Linux systems.
For example, assuming a Windows TEP Server and that the fully qualified XML filename is C:IBMITMCNPSevent_classes.xml, the environment variable would be updated as follows:
Note: The above line includes a space before the equals sign. During testing the TEP Server failed to start if the space was removed.
On UNIX/Linux, this update will get written to the current configuration file when the TEPS configuration tool is run, for example:
$CANDLEHOME/bin/itmcmd config -a cq
The TEP Server process/service must be restarted for the new configuration to be loaded. Once the restart has completed the new event classes will be available for selection from the Select Event Class dialog, as demonstrated below.
This is a very useful tool but there are restrictions. Firstly, only leaf event classes that are children of the omegamon_base event class are available for selection. This is to ensure the correct attributes are available to support the TEC/OMNIbus Synchronisation.
Secondly, this tool is reliant on the TME environment on a TEC Server. This is a severe restriction where events are only forwarded to Netcool/OMNIbus, and no TEC Server is available.
Since this TIP was written ITM 6.2.2 FP01 has been released by IBM with a feature updated to tedgen which enables it to run independently of the TEC Server. See this Orb Data FAQ for more details.