Re: snmptrap question
Simon Chamlian <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <CAJTs9Vkx+WX8JkYrr4btMw5XfWg6SqR4Y+n-zHM+cLoU2TCnsg@mail.gmail.com> |
Thanks.
Now my MIB declares a NOTIFICATION-TYPE:
* mpbcRMHTrapCritical NOTIFICATION-TYPE
OBJECTS {
mpbcRMHAlarmNEID,
mpbcRMHAlarmSlot,
mpbcRMHAlarmModule,
mpbcRMHAlarmID,
mpbcRMHAlarmDescription,
mpbcRMHAlarmStartTime
}
STATUS current
DESCRIPTION "Critical Trap alarm."
::= { mpbcRMHTrap 1 }
*
-------------------------------------------------------------------
I don't understand the OBJECTS part. Can we send the values of all these
objects in the trap details?
Presently, what I get in the details of the trap is:
*SNMPv3 Trap Pdu, MsgId = 1446431974, MaxSize = 65507
Flags = Auth/noPriv, SecurityModel = USM
EngineId = [0x80001f88806f673b3b0b1f4da1], EngineBoots = 161, EngineTime =
3, UserName = [testrwauth]
ContextEngineId = [0x80001f88806f673b3b0b1f4da1], ContextName = []
Request Id = 1843318089, Error Status = 0 , Error Index = 0
Oid1 = sysUpTime.0 , Type = TimeTicks, Value = 48 hrs: 15 min: 02 sec
Oid2 = snmpModules.1.1.4.1.0 , Type = ObjectID, Value = mpbcRMH-TrapCritical
*
TIA,
S
On Wed, Jan 11, 2012 at 5:21 PM, Dave Shield <[email protected]>wrote:
> On 11 January 2012 21:31, Simon Chamlian <[email protected]> wrote:
> > I'm issuing the following snmptrap command:
> >
> > snmptrap -v 3 -u testrwauth -a MD5 -A "authentication test" -l
> authNoPriv
> > 172.27.57.34 42 MPBC-RMH-MIB::mpbcRMH-Mon-HPU-State
>
> What is the definition of the MIB object mpbcRMH-Mon-HPU-State ?
> Is this defined as OBJECT-TYPE or NOTIFICATION-TYPE?
>
> If it's defined as a MIB object (rather than as a Notification),
> then it's not valid to use it here.
>
>
> > 1) This is returning the ObjectID in the summary of my trap window
> > (i.e, my trap log has 4 columns: Time, Source, Type and Summary).
> >
> > Instead of getting the ObjectdID in the Summary, is it possible to
> get
> > the 'Value' this OID?
>
> The snmptrap command takes two basic parameters:
> - an integer (the "sysUpTime" value)
> - an OID (of a Notification-Type object)
>
> This is then optionally followed by a number of OID-type-value triplets
> (in the same form as would be used for "snmpset")
> So if the notification definition lists four payload objects, then the
> snmptrap command should look something like
>
> snmptrap .... 42 myTrapOID
> myTime.1 t 12345
> mySource.1 a 1.2.3.4
> myType.1 i 99
> mySummary.1 s "The Good, the Bad and the Ugly"
>
> (with suitable varbind triples for the four payload elements)
>
> Yes, the trap can contain the required values, but you'll need
> to specify these as part of the snmptrap command.
>
>
> > 2) the 42 right after the IP address, what does it do?
>
> This is the sysUpTime.0 value.
> From the snmptrap(1) man page:
>
> snmptrap -v [2c|3] [COMMON OPTIONS] [-Ci] uptime trap-oid
> [OID TYPE VALUE]...
>
> In your exapmle
> 42 is the parameter 'uptime'
> mpbcRMH-Mon-HPU-State is the parameter 'trap-oid'
>
> Dave
>
------------------------------------------------------------------------------
RSA(R) Conference 2012
Mar 27 - Feb 2
Save $400 by Jan. 27
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev2
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users