Chapter 9. IBM Tivoli NetView integration 311
varbind 4: 1038958353 1208
varbind 5: openview
varbind 6: 9.13.0.0
varbind 7:
varbind 8:
Network managed: Specific: 50790416
Sending message:
TRAP:EVENT
<event>
<id>
<class>NetworkSubnet</class>
<instid>9.13:NV0</instid>
</id>
<type>MNET_EV</type>
<context>Network</context>
<tbsm>
<type>MSG</type>
<desc>Network 9.13 Managed.</desc>
</tbsm>
</event>
Finished processing trap 50790416.
tbsmatrace.log
You can create this file and start additional trace logging at any time. As soon as
an empty file named tbsma.trigger is created, tracing of adapter activity is written
into tbsmatrace.log.
9.7 Extending the menus
Both the IBM Tivoli Business Systems Manager Java console and the NetView
Web console offer some (more or less limited) capabilities to customize and
change their behavior. We will now show two examples of how to extend the
consoles with custom command.
The first example shows how you can extend the NetView Web console to
include the IBM Tivoli Business Systems Manager bulk upload, normally only
available with the NetView native GUI.
The second example shows how to extend the IBM Tivoli Business Systems
Manager Java console to call additional NetView Console Views.
312 Tivoli Business Systems Manager Version 2.1: End-to-End Business Impact Management
9.7.1 Extending the NetView Web console
Starting with NetView Version 7.1, the NetView Web console is meant to be the
main interface to NetView. The native console should be used only for
administrative purposes such as modifying maps and NetView working options.
IBM Tivoli Business Systems Manager also launches the NetView Web console
on demand in order to show NetView-related topology information, diagnostic
tools, and object properties. Unfortunately, to initate a bulk upload to IBM Tivoli
Business Systems Manager, you have to start the native NetView GUI. We will
now show how to extend the menus of the NetView Web console to make the
bulk upload menu available in the console, as well.
The NetView Web console offers limited extension capabilities. You can extend
the menus and execute commands as long as the output can be displayed in a
Web browser window. The supplied Web console functions and menus are
defined in two files:
? /usr/OV/www/webapps/netview/warf/Actions.xml
This file contains all the actions and functions provided by the Web console in
a compressed format.
? /usr/OV/www/webapps/netview/warf/Templates/WebConsole
This file conatins the menu definitions for the actions and functions provided
by the Web console.
You can modify these two files, but in the event of a NetView update or patch
apply, the update may overwrite them. To prevent this, you can supply your own
action definition file and your own menu file, which will not be overwritten. We will
provide the extensions in separate definition files.
Note the warf subdirectory in the file path: NetView Web console definition files'
role and behavior are similar to NetView Application Registration Files (arf), so
they are called Web Application Registration Files (warf) and are located in the
path's warf subdirectory. The main difference between warf files and arf-type
registration files is the format. Unlike standard NetView registration files and their
descriptive C-style format, the warf files use XML as their description language.
Each distinctive function of the NetView Web console consists of two definitions:
? An action definition, which you must store under
/usr/OV/www/webapps/netview/warf. The action definition defines what you
want executed when selected.
? A menu definition that you must store under
/ust/OV/www/webapps/netview/warf/Templates/WebConsole. This definition
specifies the position of your new menu under the menu tree.
Chapter 9. IBM Tivoli NetView integration 313
With this information, we will now show all the steps required to extend the Web
console with a new menu, which enables us to trigger a bulk upload from the
Web console. You can use this example as a template for own extensions of the
Web console. For a brief explanation of the contents of the definition files,
Example 9-18 on page 313 lists the action definition and Example 9-19 on
page 315 contains the Menu definition.
You also may refer to the section Web Console Enhancements in the
NetView
7.1.3 Release Notes
, GI11-0927-2 for additional information about action and
menu definitions.
Example 9-18 The new action definition MyActions.xml
<?xml version="1.0" encoding="UTF-8"?>
<!--<!DOCTYPE WARF SYSTEM 'WARF.dtd'>-->
<WARF xmlns:xlink="http://www.w3.org/1999/xlink">
<Meta name="Version" value="2.0" />
<Meta name="Written" value="2002 ITSO Austin/Glasi GA24-6610" />
<Application name="my-webconsole">
<Action id="launchbu"
securityConstraint="RelaxedAccess"
roles="SuperUser,User">
<Name>TBSM_BulkUpload</Name>
<Mnemonic>U</Mnemonic>
<ShortDescription>Bulk Upload</ShortDescription>
<LongDescription>Trigger a TBSM Bulk Upload</LongDescription>
<ActionHandler name="LaunchServerAppHandler">
<Method>
<MethodName>
com.tivoli.netview.client.NetViewApplet.launchServerApp
</MethodName>
<ArgList>
<Val>
<Array>
<Val>Glasikey1</Val>
<Val>/usr/OV/bin/tbsmbulkupload.ksh</Val>
</Array>
</Val>
</ArgList>
</Method>
</ActionHandler>
</Action>
</Application>
</WARF>
<?xml ...> You must not change the first three entries in a warf file,
especially the first line that specifies the encoding. Be
sure it specifies UTF-8 as the character set.
314 Tivoli Business Systems Manager Version 2.1: End-to-End Business Impact Management
<Application> Defines the name of the application. You can assign any
unique name to your application. Note that webconsole is
a reserved name already used in the main action
definition.
<Action id=> This keyword specifies a unique id, which you will
reference in your menu definitions. You may apply all the
roles you want to allow to perform the action, but leave the
securityConstraint= entry unchanged.
<Name> Defines a name for the action.
<Mnemonic> Defines a menu shortcut for your action. Be sure the
mnemonic is specified out of the characters used in the
name definition.
<ShortDescription> Here you can specify a short description of your new
menu. It will appear in the role dialog of the NetView
Security Console, as shown in Figure 9-21 on page 317.
<LongDescription> Defines a more specific explanation of your new menu.
Appears in the roles dialog as well.
<ActionHandler> Specifies the handler meant to execute the action. Dont
change the name LaunchServerAppHandler. This handler
will execute your action on the NetView server.
<Method> Starts a method subsection in which you will define the
program to be executed, along with all arguments it might
require.
<MethodName> Specifies the method assigned to the application handler.
The full path of the method is required. In our case it is
com.tivoli.netview.client.NetViewApplet.launchServerApp
<ArgList> Starts an argument list subsection. Each of the arguments
is defined inside a <Val></Val> definition.
<Array> Our action, issuing a bulk upload to IBM Tivoli Business
Systems Manager, is actually implemented as a Korn
shell script. Parameters to a shell script are passed in the
form of an array. Even though our bulk upload script does
not require any parameters, you must supply the
parameter array. The first value in the array acts as a key,
which must be unique for all actions defined to execute
under a given action handler. In our case, the key must be
unique for all actions executed under
LaunchServerAppHandler.
The second value in the array must be the program name.
A full path is required. Therefore, our array will be
<Array>
Chapter 9. IBM Tivoli NetView integration 315
<Val>Glasikey1</Val>
<Val>/usr/OV/bin/tbsmbulkupload.ksh</Val>
</Array>.
You can put multiple action definitions into one single file. Each definition requires
the full set of keywords as discussed.
The second set of definitions required are the menu entries. As mentioned
previously in this section, menu definitions are stored under:
/usr/OV/www/webapps/netview/warf/Templates/WebConsole
Example 9-19 lists our menu definition.
Example 9-19 The Menu definition file MyMenubar.xml
<?xml version='1.0' encoding='UTF-8'?>
<!--<!DOCTYPE WARF SYSTEM '../../WARF.dtd'>-->
<WARF xmlns:xlink='http://www.w3.org/1999/xlink'>
<Meta name="Written" value="2002 ITSO Austin/Glasi GA24-6610" />
<Application name='webconsole'>
<!-- MenuBar name can not be 'MenuBar', which is reserved by the default
MenuBar.xml -->^M
<MenuBar name="MyMenuBar">
<Menu name="tools">
<Separator/>
<Menu name="TBSM">
<Mnemonic>T</Mnemonic>
<Name>TBSM</Name>
<MenuItem name="TBSM_BulkUpload">
<ActionRef
xlink:href='MyActions.xml#xpointer(id("launchbu"))'/>
</MenuItem>
</Menu>
</Menu>
</MenuBar>
</Application>
</WARF>
<?xml ...> The same as for the action definition. Dont change the
first three lines, and be sure the character set encoding is
set to UTF-8.
<Application> Use the same name as in your action definition.
<MenuBar> Starts a menu bar definition. Apply the same rules as for
the application name. The name must be unique. (You
cant give it the name MenuBar because this name is
already used for the default menubar of the Web console.)
..................Content has been hidden....................

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