beautypg.com

Keywords, Built-in variables for $varbind, Object identifier file – IBM Enterprise Console User Manual

Page 84

background image

4:ATTR(=, ’openViewData3");

5:ATTR(=, "openViewData4");

MAP

origin=$V3;

sub_origin=$V4;

severity=WARNING;

OV_status=2; # Marginal

Keywords

The OpenView adapter supports the use of the following keywords in class
definition statements. These keywords can be useful if you want to customize
events.

$COMMUNITY

Specifies the trap community string.

$ENTERPRISE

Specifies the enterprise object identifier of the object generating the
trap.

$SOURCE_TIME

Specifies the value of sysUpTime of the object generating the trap.

$TYPE

Specifies the generic trap type number (0-6).

$SPECIFIC

Specifies the enterprise-specific trap type number.

$SOURCE_ADDR

Specifies the address of the object sending the trap.

$AGENT_ADDR

Specifies the address of the object generating the trap.

$VARBIND

Specifies a list of all non-fixed attributes.

$VB_NUM_VARS

Specifies the number of elements in $VARBIND.

$ADAPTER_HOST

The name of the host machine where the adapter runs.

The following example shows how you can use the keywords:

FETCH

1: IPNAME($SOURCE_ADDR);

SELECT

1: ATTR(=, $ENTERPRISE);

Built-in Variables for $VARBIND: $VARBIND

is a list of all non-fixed attributes.

To access the individual elements of $VARBIND, use the VB_# variables, where #
is a number greater than 0. For example, if $VARBIND has three elements, you
can use VB_1, VB_2, and VB_3 as variables to access the data. The following
example performs string functions on the elements of $VARBIND.

ATTR(=, "VB_1"), VALUE(CONTAINS, "some string")

Because $VARBIND is a list of strings, if it contains more than one element,
performing a string function like CONTAINS against $VARBIND causes the
adapter to stop unexpectedly.

Object Identifier File

The object identifier file maps object identifiers used by SNMP to names. No
changes are necessary before the adapter is run.

72

IBM Tivoli Enterprise Console: Adapters Guide