nv-l

Re: [nv-l] Trap Configration

2003-01-10 16:25:27
Subject: Re: [nv-l] Trap Configration
From: James Shanks <jshanks AT us.ibm DOT com>
To: nv-l AT lists.tivoli DOT com
Date: Fri, 10 Jan 2003 16:25:27 -0500



You are looking for function which doesn't exist.
trapd displays whole variables, not parts of them.  There is no substring
function available.
If the device sends just one variable, then what you can display is simply
$1
In the case you presented, then trap would show as
3494 18007  TESTM *Test Message from tsm3494

The only other option you have is to write a script of your own to issue
your own trap with snmptrap which contains just exactly the text you want.
You make their trap "Log Only" (so you can see it in trapd.log) and run
your script as a command for automatic action.  Lots of work, and lots of
processing cycles just to remove a few numeric variables from the front of
the message.
Is it worth it?

A better alternative is to train your operators to ignore the numerics, or
better still, train them to understand what they mean.
You could create, not an automatic action, but rather an additional action
(see the man page on trapd.conf) so that the operators can pull down the
Options --> Additional Action list and click on your action and see what
those mean.

James Shanks
Level 3 Support  for Tivoli NetView for UNIX and NT
Tivoli Software / IBM Software Group


                                                                                
                              
                      "Mahesh Tailor"                                           
                              
                      <MTailor@carilion        To:       <nv-l AT lists.tivoli 
DOT com>                              
                      .com>                    cc:                              
                              
                                               Subject:  [nv-l] Trap 
Configration                             
                      01/10/03 03:42 PM                                         
                              
                                                                                
                              
                                                                                
                              




Hello,

NV 7.1.3 on AIX 4.3.3.10

How do I tokenize an incoming trap?  I am trying to define some traps
for the IBM 3494 Enterprise Library and the trap it sends has one
variable only.  This variable contains the following, for example [from
Operators Guide, p261],  . . .

3494 C2444 OPINT 48 180 - - A cartridge containing invalid media has
been left in the device 180 feed slot. Remove sartridge.

Gernerally, the traps are formatted as follows . . .

3494 {Library Sequence Number} {Library Manager Trap Type} {Trap
Number} {Rest of message}

What I want to do is be able to somehow show the {Rest of Message} part
of the trap when it is recorded in the trapd.log.

Before formatting here's what is recorded in the trapd.log.

1041951368 3  Tue Jan 07 09:56:08 2003 tsm3494.carilion.com      ? Trap
found with no known format in trapd.conf(4)
1041951368 3  Tue Jan 07 09:56:08 2003  tsm3494.carilion.com      ?
Enterprise ibm (1.3.6.1.4.1.2.2.1.5) community public
1041951368 3  Tue Jan 07 09:56:08 2003  tsm3494.carilion.com      ?
generic trap:6 specific trap:9
1041951368 3  Tue Jan 07 09:56:08 2003  tsm3494.carilion.com      ?
Timestamp:94571500 Agentaddr:tsm3494.carilion.com args(1):
1041951368 3  Tue Jan 07 09:56:08 2003  tsm3494.carilion.com      ?
[1] private.enterprises.ibm.2.1.5.2.0 (OctetString): 3494 18007
 TESTM *Test Message from tsm3494

In this case, I need to extract the "Test Message from tsm3494" part of
the trap only.  In other cases I will need to extract [from Operators
Guide example above] the C2444 part of the message.

TIA

Mahesh

---------------------------------------------------------------------
To unsubscribe, e-mail: nv-l-unsubscribe AT lists.tivoli DOT com
For additional commands, e-mail: nv-l-help AT lists.tivoli DOT com

*NOTE*
This is not an Offical Tivoli Support forum. If you need immediate
assistance from Tivoli please call the IBM Tivoli Software Group
help line at 1-800-TIVOLI8(848-6548)





<Prev in Thread] Current Thread [Next in Thread>