nv-l
[Top] [All Lists]

Re: snmptrap

To: nv-l@lists.tivoli.com
Subject: Re: snmptrap
From: Jane Curry <jane.curry@skills-1st.co.uk>
Date: Fri, 19 Oct 2001 13:08:35 +0100
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.


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

Archive operated by Skills 1st Ltd

See also: The NetView Web