DX NetOps

  • 1.  We wan to send a SNMP trap with some text

    Posted Jan 05, 2018 04:32 AM

    We wan to send a SNMP trap with some text (any text) how can we send . I tried below command but not getting text for this what we need to do?

    snmptrap -v 1 -c public 172.19.251.116 .1.3.6.1.4.1.0 172.19.251.120 2 0 "Text"



  • 2.  Re: We wan to send a SNMP trap with some text
    Best Answer

    Posted Jan 07, 2018 06:36 AM

    within the snmptrap command you have to specify the OID and the data type for the MIB object you want to respond.

    A variable with the OID and the given value will be added to the trap pdu.

    To use this variable within Spectrum, in addition the OID has to be mapped to a Spectrum varbind in the AlertMap file. The varbind can be used EventDisp and Event files.

    Example for trap:

    ../snmptrap -h host -p 162 -c alarm 1.3.6.1.4.1.8164.2 10.10.10.10 6 1014 1234 \
     1.3.6.1.4.1.8164.1.48.1.1.3 OctetString vpnnamegedoens \
     1.3.6.1.4.1.8164.1.48.1.1.4 OctetString servnamegedoens \
     1.3.6.1.4.1.8164.1.48.1.1.6 IPAddr "10.10.10.7" \
     1.3.6.1.4.1.8164.1.48.1.1.8 Integer 8080 \
     1.3.6.1.4.1.8164.1.48.1.1.5 IPAddr 10.10.10.2 \
     1.3.6.1.4.1.8164.1.48.1.1.7 Integer 1024

    Example for AlertMap:

    1.3.6.1.4.1.8164.2.6.1014    0x0fff31d8 1.3.6.1.4.1.8164.1.48.1.1.3(1,0)\
                                            # starSGTPServName
                                            1.3.6.1.4.1.8164.1.48.1.1.4(2,0)\
                                            # starSGTPPeerAddr
                                            1.3.6.1.4.1.8164.1.48.1.1.6(3,0)\
                                            # starSGTPPeerPort
                                            1.3.6.1.4.1.8164.1.48.1.1.8(4,0)\
                                            # starSGTPSelfAddr
                                            1.3.6.1.4.1.8164.1.48.1.1.5(5,0)\
                                            # starSGTPSelfPort
                                            1.3.6.1.4.1.8164.1.48.1.1.7(6,0)

     

    Variable names "1" to "6" can be used in Event configuration.

     

    Regards,

    Olaf