nv-l
[Top] [All Lists]

RE: snmptrap

To: nv-l@lists.tivoli.com
Subject: RE: snmptrap
From: Ingleson Peter <peter.ingleson@ncmgroup.com>
Date: Fri, 19 Oct 2001 15:00:08 +0200
Jane,

Thanks for that, but I'm still trying to make the intellectual leap. 

I've taken your advice and given up on the GUI version. 

I'm now issuing the following command 

snmptrap hostname .1.3.6.1.2.1.10.32 source_name 6 1 0 

I then want to add three variable values, after the 0 for time ticks, how
could I do this, the values (for example) are 15 400 2.

Thanks
Peter Ingleson 

-----Original Message-----
From: Jane Curry [mailto:jane.curry@skills-1st.co.uk]
Sent: Friday, October 19, 2001 1:09 PM
To: IBM NetView Discussion
Subject: Re: [NV-L] snmptrap


Peter,
I have a feeling that the snmptrap command from the ServerSetup Diagnose
menu is broken (I believe it loses a parameter somewhere).  I always use
the command line via a little harness shellscript that is
variable-driven.  I have appended a sample - it's probably more complex
than you need but I hope you can get the sense out of it.

Cheers,
Jane
---------------------------------------------
#!/bin/ksh
#
# Send trap using the snmptrap supplied with NetView in /usr/OV/bin
# Trap here is NetView change status trap
# Source should be passed as $1 - fully qualified domain name
# Construct trap message from DM Environment vars
#  $MONITOR passed as $2
# $PROBE_ARG passed as $3
# $EFFECTIVE_VALUE passed as $4
#
#
#set -x
MANAGER=poppet.skills-1st.co.uk
ENTERPRISE=.1.3.6.1.4.1.2.6.3.1
SOURCE="$1"
GENTRAP=6
SPECTRAP=58916871
TIMESTAMP=1
TRAPVAR=.1.2.6.1.4.1.2.6.3.1.1.2.0
SELECTION="$SOURCE":Tivoli_DM
STATUS=User2
MESSAGE="Monitor $2 with parameters $3 thresholded at $4"
#STATUS=Normal
#
/usr/OV/bin/snmptrap $MANAGER $ENTERPRISE $SOURCE $GENTRAP $SPECTRAP
$TIMESTAMP  \
  $TRAPVAR Integer 14    \
  $TRAPVAR OctetString $SELECTION  \
  $TRAPVAR OctetString "$MESSAGE Object status is" \
  $TRAPVAR OctetString $STATUS
#

--
Tivoli Certified Enterprise Consultant & Instructor
Skills 1st Limited, 2 Cedar Chase, Taplow, Bucks, SL6 0EU, UK
Tel: +44 (0)1628 782565
Copyright (c) 2001 Jane Curry <jane.curry@skills-1st.co.uk>.  All rights
reserved.


_________________________________________________________________________
NV-L List information and Archives: http://www.tkg.com/nv-l


Privileged/Confidential Information may be contained in this message.  If
you are not the addressee indicated in this message (or responsible for
delivery of the message to such person), you may not copy or deliver this
message to anyone.  In such a case, you should destroy this message and
kindly notify the sender by reply e-mail.


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

Archive operated by Skills 1st Ltd

See also: The NetView Web