SNMP newbie - passing connection parameters via snmpdtrap.conf toshell script - SNMP

This is a discussion on SNMP newbie - passing connection parameters via snmpdtrap.conf toshell script - SNMP ; Hi, Please could someone give me a little help. I have set up the traphandle within the smmptrapd.conf to run a trap processing shell script. traphandle SNMPv2-SMI::enterprises.9.0.1 /path/to/trapscript.sh I would like to know how to pass all the related connection ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: SNMP newbie - passing connection parameters via snmpdtrap.conf toshell script

  1. SNMP newbie - passing connection parameters via snmpdtrap.conf toshell script

    Hi,

    Please could someone give me a little help. I have set up the traphandle
    within the smmptrapd.conf to run a trap processing shell script.

    traphandle SNMPv2-SMI::enterprises.9.0.1 /path/to/trapscript.sh

    I would like to know how to pass all the related connection parameters
    like address, local ip, remote ip, tcpConnState, tcpConnectClose etc
    (not just one parameter like tcpConnectClose). Basically all of the
    connection information - i.e presented (say when snmptrapd is run) on
    the console, when a trap occurs.

    Hope this makes sense. I just would just like to know the correct way to
    approach this task (being a beginner).

    Thanks

    Patrick

  2. Re: SNMP newbie - passing connection parameters via snmpdtrap.conf to shell script

    bigkumho wrote:
    > I would like to know how to pass all the related connection parameters
    > like address, local ip, remote ip, tcpConnState, tcpConnectClose etc
    > (not just one parameter like tcpConnectClose). Basically all of the
    > connection information - i.e presented (say when snmptrapd is run) on
    > the console, when a trap occurs.


    All the trap information is passed as standard input to your traphandler.
    Please see the traptoemail script in the source distribution.

    /Niels

    --
    Niels Baggesen -- @home -- Århus -- Denmark -- niels@baggesen.net
    The purpose of computing is insight, not numbers -- R W Hamming

+ Reply to Thread