On 09/08/07, Joe Warren-Meeks <[EMAIL PROTECTED]> wrote:
> I've started using the PASS
> mechanism and writing my own MIB, which all works fine, except I've
> broken snmpwalking somehow.
> I'm currently using pass to run the following script:
>
> #!/bin/sh
>
> THING=`/usr/bin/mysql --batch --password=notmyrealpassword -u root
> coreJbpm --execute='select count(*) from JBPM_LOG;'|grep -v count`
>
> echo ".1.3.6.1.4.1.4914.1.1"
> echo "integer"
> echo $THING
Your pass script should check how it is being invoked - whether this is
part of a GET request ("mysql-jbpm-test.sh -g OID"), or as part of a
GETNEXT request ("mysql-jbpm-test.sh -n OID").
Similarly, it should check the OID that it is given as part of this
command, and how this compares to the OID(s) that it implements.
Assuming the script only supports a single MIB value (e.g. a scalar
object), then for a GETNEXT request for any OIDs *before* the sole
valid OID, it should return the OID/type/value triplet (as you do).
But a GETNEXT request for the OID .1.3.6.1.4.1.4914.1.1 or
later, then your script should exit without printing anything at all.
The agent can then move on to the next module in the tree.
Dave
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users