extend problem .... - SNMP

This is a discussion on extend problem .... - SNMP ; Background: SuSE Linux kernel-source-2.6.16.46-0.12 net-snmp-5.3.0.1-25.24.3. snmpd.conf: # Please see /usr/share/doc/packages/net-snmp/EXAMPLE.conf for a # more complete example and snmpd.conf(5). # # Writing is disabled by default for security reasons. If you'd like # to enable it uncomment the rwcommunity line and ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: extend problem ....

  1. extend problem ....

    Background:
    SuSE Linux kernel-source-2.6.16.46-0.12
    net-snmp-5.3.0.1-25.24.3.
    snmpd.conf:
    # Please see /usr/share/doc/packages/net-snmp/EXAMPLE.conf for a
    # more complete example and snmpd.conf(5).
    #
    # Writing is disabled by default for security reasons. If you'd like
    # to enable it uncomment the rwcommunity line and change the community
    # name to something nominally secure (keeping in mind that this is
    # transmitted in clear text).

    # don't use ' < > in strings for syslocation or syscontact
    # Note that if you define the following here you won't be able to change
    # them with snmpset
    syslocation Server Room
    syscontact Sysadmin (root@localhost)

    # These really aren't meant for production use. They include all MIBS
    # and can use considerable resources. See snmpd.conf(5) for information
    # on setting up groups and limiting MIBS.
    rocommunity demopublic
    rocommunity 127.0.0.1
    rwcommunity mysecret

    extend 1.3.6.1.4.1.13856.100000 scriptproxy /root/script.sh

    Problem:
    Trying to do an snmpget on this OID to trigger the execution of the script. The SNMPGET returns the following:

    :~ # snmpget -v 1 -Cf -c demopublic localhost .1.3.6.1.4.1.13856.100000
    Error in packet
    Reason: (noSuchName) There is no such variable name in this MIB.
    Failed object: SNMPv2-SMI::enterprises.13856.100000

    I am new to this and lost. I believe I'm reading the man pages correctly, but I'm obviously missing something. Any suggestions would be welcome.


    Todd R. Strauch
    Systems Programmer III
    Medical Center Information Technology
    University of Michigan
    Ann Arbor, Michigan
    tstrauch@umich.edu

    ************************************************** ********
    Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues

    -------------------------------------------------------------------------
    This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
    Build the coolest Linux based applications with Moblin SDK & win great prizes
    Grand prize is a trip for two to an Open Source event anywhere in the world
    http://moblin-contest.org/redirect.p...r_id=100&url=/
    _______________________________________________
    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/...net-snmp-users


  2. Re: extend problem ....

    2008/9/22 Todd strauch :
    > extend 1.3.6.1.4.1.13856.100000 scriptproxy /root/script.sh
    >
    > Problem:
    > Trying to do an snmpget on this OID to trigger the execution of the script.
    > The SNMPGET returns the following:
    >
    > :~ # snmpget -v 1 -Cf -c demopublic localhost .1.3.6.1.4.1.13856.100000
    > Error in packet
    > Reason: (noSuchName) There is no such variable name in this MIB.


    That's correct. The output from the extend directive lies within the
    OID subtree rooted at .1.3.6.1.4.1.13856.100000, but there is no
    information associated with this OID directly.

    Try "snmpgetnext" or "snmpwalk" on the same OID.

    Dave

    -------------------------------------------------------------------------
    This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
    Build the coolest Linux based applications with Moblin SDK & win great prizes
    Grand prize is a trip for two to an Open Source event anywhere in the world
    http://moblin-contest.org/redirect.p...r_id=100&url=/
    _______________________________________________
    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/...net-snmp-users


  3. Re: extend problem ....

    I've tried both the getnext and the walk. While they both return data, they are failing to trigger the execution of the associated script.

    Todd R. Strauch
    Systems Programmer III
    Medical Center Information Technology
    University of Michigan
    Ann Arbor, Michigan
    tstrauch@umich.edu

    >>> "Dave Shield" 9/23/2008 3:08 AM >>>

    2008/9/22 Todd strauch :
    > extend 1.3.6.1.4.1.13856.100000 scriptproxy /root/script.sh
    >
    > Problem:
    > Trying to do an snmpget on this OID to trigger the execution of the script.
    > The SNMPGET returns the following:
    >
    > :~ # snmpget -v 1 -Cf -c demopublic localhost .1.3.6.1.4.1.13856.100000
    > Error in packet
    > Reason: (noSuchName) There is no such variable name in this MIB.


    That's correct. The output from the extend directive lies within the
    OID subtree rooted at .1.3.6.1.4.1.13856.100000, but there is no
    information associated with this OID directly.

    Try "snmpgetnext" or "snmpwalk" on the same OID.

    Dave

    -------------------------------------------------------------------------
    This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
    Build the coolest Linux based applications with Moblin SDK & win great prizes
    Grand prize is a trip for two to an Open Source event anywhere in the world
    http://moblin-contest.org/redirect.p...r_id=100&url=/
    _______________________________________________
    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/...net-snmp-users


    ************************************************** ********
    Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues

    -------------------------------------------------------------------------
    This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
    Build the coolest Linux based applications with Moblin SDK & win great prizes
    Grand prize is a trip for two to an Open Source event anywhere in the world
    http://moblin-contest.org/redirect.p...r_id=100&url=/
    _______________________________________________
    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/...net-snmp-users


  4. Re: extend problem ....

    2008/9/23 Todd strauch :
    > I've tried both the getnext and the walk. While they both
    > return data, they are failing to trigger the execution of the associated script.


    What is the exact snmpgetnext command you are using?
    What is the output of this request?

    Try running the agent using

    snmpd -f -Le -DnsExtend ....

    What does that display when you run the snmpgetnext command?

    Dave

    -------------------------------------------------------------------------
    This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
    Build the coolest Linux based applications with Moblin SDK & win great prizes
    Grand prize is a trip for two to an Open Source event anywhere in the world
    http://moblin-contest.org/redirect.p...r_id=100&url=/
    _______________________________________________
    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/...net-snmp-users


  5. Generating SNMP Trap from example notification

    Hello,

    I'm able to get SNMP traps by compiling snmp with
    option --with-mib-modules=examples/notification.
    It appears to me the function "send_v2trap()" sends out the trap with OID
    only

    I looked into others examples and found another function
    "send_enterprise_trap_vars()" appears to send valus along with OID
    However I'm not able to get the trap

    My questions are
    (1) Is it possible to use the function "send_v2trap()" to send out traps
    with both OID and its value ?
    (2) If not, what function should I use to replace the function
    "send_v2trap()" in the example notification.c to send out both OID and value
    ?
    (2) If not, how to get the function "send_enterprise_trap_vars()" to work
    properly ?

    Thanks so much for your help,

    Duy Kyng


    -------------------------------------------------------------------------
    This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
    Build the coolest Linux based applications with Moblin SDK & win great prizes
    Grand prize is a trip for two to an Open Source event anywhere in the world
    http://moblin-contest.org/redirect.p...r_id=100&url=/
    _______________________________________________
    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/...net-snmp-users


  6. RE: Generating SNMP Trap from example notification

    I think you need to use:
    snmp_varlist_add_variables(...)
    To add each variable prior to calling send_v2_trap(var_list)


    -----Original Message-----
    From: Duy-Ky Nguyen [mailto:duykyng@yahoo.com]
    Sent: Thursday, September 25, 2008 1:24 AM
    To: net-snmp-users@lists.sourceforge.net
    Subject: Generating SNMP Trap from example notification

    Hello,

    I'm able to get SNMP traps by compiling snmp with option
    --with-mib-modules=examples/notification.
    It appears to me the function "send_v2trap()" sends out the trap with
    OID only

    I looked into others examples and found another function
    "send_enterprise_trap_vars()" appears to send valus along with OID
    However I'm not able to get the trap

    My questions are
    (1) Is it possible to use the function "send_v2trap()" to send out
    traps with both OID and its value ?
    (2) If not, what function should I use to replace the function
    "send_v2trap()" in the example notification.c to send out both OID and
    value ?
    (2) If not, how to get the function "send_enterprise_trap_vars()" to
    work properly ?

    Thanks so much for your help,

    Duy Kyng


    ------------------------------------------------------------------------
    -
    This SF.Net email is sponsored by the Moblin Your Move Developer's
    challenge Build the coolest Linux based applications with Moblin SDK &
    win great prizes Grand prize is a trip for two to an Open Source event
    anywhere in the world
    http://moblin-contest.org/redirect.p...r_id=100&url=/
    _______________________________________________
    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/...net-snmp-users

    -------------------------------------------------------------------------
    This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
    Build the coolest Linux based applications with Moblin SDK & win great prizes
    Grand prize is a trip for two to an Open Source event anywhere in the world
    http://moblin-contest.org/redirect.p...r_id=100&url=/
    _______________________________________________
    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/...net-snmp-users


  7. Re: Generating SNMP Trap from example notification

    Hello Joan,

    I have used that function to create the var, but the issue is the function
    send_v2trap() has only 1 argument, so it must be OID, while the function
    send_enterprise_trap_vars() has 2 arguments, so I can use the 1st for OID
    and the 2nd for its value
    Dear Joan,

    I got it.
    So it adds to append to the var as long as we want ;-)

    Thanks so so much for your very geat help, Joan

    Best Regards,

    Duy-Ky


    ----- Original Message -----
    From: "Joan Landry"
    To: "Duy-Ky Nguyen" ;

    Sent: Thursday, September 25, 2008 4:35 AM
    Subject: RE: Generating SNMP Trap from example notification


    I think you need to use:
    snmp_varlist_add_variables(...)
    To add each variable prior to calling send_v2_trap(var_list)


    -----Original Message-----
    From: Duy-Ky Nguyen [mailto:duykyng@yahoo.com]
    Sent: Thursday, September 25, 2008 1:24 AM
    To: net-snmp-users@lists.sourceforge.net
    Subject: Generating SNMP Trap from example notification

    Hello,

    I'm able to get SNMP traps by compiling snmp with option
    --with-mib-modules=examples/notification.
    It appears to me the function "send_v2trap()" sends out the trap with
    OID only

    I looked into others examples and found another function
    "send_enterprise_trap_vars()" appears to send valus along with OID
    However I'm not able to get the trap

    My questions are
    (1) Is it possible to use the function "send_v2trap()" to send out
    traps with both OID and its value ?
    (2) If not, what function should I use to replace the function
    "send_v2trap()" in the example notification.c to send out both OID and
    value ?
    (2) If not, how to get the function "send_enterprise_trap_vars()" to
    work properly ?

    Thanks so much for your help,

    Duy Kyng


    ------------------------------------------------------------------------
    -
    This SF.Net email is sponsored by the Moblin Your Move Developer's
    challenge Build the coolest Linux based applications with Moblin SDK &
    win great prizes Grand prize is a trip for two to an Open Source event
    anywhere in the world
    http://moblin-contest.org/redirect.p...r_id=100&url=/
    _______________________________________________
    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/...net-snmp-users


    -------------------------------------------------------------------------
    This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
    Build the coolest Linux based applications with Moblin SDK & win great prizes
    Grand prize is a trip for two to an Open Source event anywhere in the world
    http://moblin-contest.org/redirect.p...r_id=100&url=/
    _______________________________________________
    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/...net-snmp-users


+ Reply to Thread