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
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to