snmptrap with Gauge32 counter

"Matteo D'Alfonso" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <CAD2sVbvvhZErUVhm2NV_uFr+xV7NQMXLRkVORi6RfeM4-W3p7Q@mail.gmail.com>
Ciao,
I need to "simulate" this trap:

    2021-02-15 10:37:46 UDP: [1.2.3.4]:60729->[4.3.2.1]:162 [UDP:
> [1.2.3.4]:60729->[4.3.2.1]:162]:
>     .1.3.6.1.2.1.1.3.0 = Timeticks: (2065053016) 239 days, 0:15:30.16
>   .1.3.6.1.6.3.1.1.4.1.0 = OID: .1.3.6.1.4.1.9.9.500.0.0.1        .1.3.6.1.2.1.2.2.1.1.5181
> = INTEGER: 5181       .1.3.6.1.4.1.9.9.500.1.2.2.1.1.5181 = INTEGER:
> down(2)       .1.3.6.1.4.1.9.9.500.1.2.1.1.1.1001 = Gauge32: 1


But If I execute snmptrap with the following option I got an error

> snmptrap -v 2c -c publice 4.3.2.1 '' .1.3.6.1.4.1.9.9.500.0.0.1 .1.3.6.1.2.1.2.2.1.1.5181
> i 5181 .1.3.6.1.4.1.9.9.500.1.2.2.1.1.5181 i 2 .1.3.6.1.4.1.9.9.500.1.2.1.1.1.1001
> c 1 .1.3.6.1.6.3.18.1.3.0 a 1.2.3.4
> .1.3.6.1.4.1.9.9.500.1.2.1.1.1.1001: Bad variable type (Type of attribute
> is Unsigned32, not Counter32)
>

Once I added CISCO-STACKWISE-MIB, the following syntax works:

> snmptrap -v 2c -c public 4.3.2.1 '' .1.3.6.1.4.1.9.9.500.0.0.1 .1.3.6.1.2.1.2.2.1.1.5181
> i 5181 .1.3.6.1.4.1.9.9.500.1.2.2.1.1.5181 i 2 .1.3.6.1.4.1.9.9.500.1.2.1.1.1.1001
> = 1 .1.3.6.1.6.3.18.1.3.0 a 1.2.3.4


What is the syntax to send Gauge32 value without relying on the MIB file?

Thanks,
Matteo.

_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.