On Thu, 2006-02-16 at 08:14 -0500, Kyle Tucker wrote:
> > As Dave said, the suggested fix is to use the "extend" directive instead.
> 
> I believe he said I may wish to investigate it, not that is was a fix.

No - it *does* fix the repeated execution problem.
The reasons I suggested you "investigate" it are:

  a)  The MIB structure is significantly different to the
      original "exec" directive (as you've no doubt discovered).
      Now I believe it's a distinct improvement in flexibility
      and functionality, but this may be a disadvantage for
      some people.

  b)  I'm an Englishman, and one doesn't wish to push one's own
      contributions too strongly.  Such behaviour is extremely
      unsporting, and simply isn't the done thing, I say, what?


> Anyway, I have put in extend directives and find its output from a 
> snmpwalk leaving me more confused. If I ask snmpwalk for symbolic
> output, I get these for my two test entries.
> 
> nsExtendCommand."extt" = STRING: /usr/local/bin/extt
> nsExtendCommand."extt2" = STRING: /usr/local/bin/extt2

What was the exact snmpwalk command you tried?
Note that the extend MIB structure consists of three tables:

 *  nsExtendConfigTable
        containing the configuration of the various extensions.
        Walking this table should not invoke any of the individual
        extension commands

 *  nsExtendOutput1Table
        containing the results of running the extension commands
        (cached according to the relevant nsExtendCacheTime config
         setting)

 *   nsExtendOutput2Table
        containing another representation of nsExtendOutputFull,
        but structured as a series of separate lines.


So to see what extensions were set up, you'd run

     snmpwalk ......  nsExtendConfigTable

and to see what the results were, you'd run either

     snmpwalk ......  nsExtendOutput1Table

or possibly 

     snmpwalk ......  nsExtendOutput2Table


> If I try to call it with this symbolic name from snmpget, with or
> without quotes, it fails with:
> 
> snmpget ... hostname ...  nsExtendOutputFull."extt"

You *do* need the quotes, but they need to reach snmpget, rather
than being swallowed by the shell.   Try:

    snmpget ... hostname ...  nsExtendOutputFull.\"extt\"


Dave


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
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