When using ucd-snmp (ver 4.2.5, under Linux SLES 8.1), I was able to
retrieve a numerical value generated by a perl script (for mrtg
monitoring).
I was configuring snmpd with such an entry in snmpd.conf :

exec .1.3.6.1.4.1.2021.50 test /home/user/myscript

with myscript being a perl script terminating with a line :

exit ($val)

I was therefore able to retrieve the numerical value "val" via a query :

snmpget <community> <host> .1.3.6.1.4.1.2021.50.100.1

this oid being an INTEGER (i.e. suitable for mrtg or cacti).

Since I'm trying to use net-snmp (ver 5.1, under Linux Suse 9.1),
doing the same thing, I'm only getting 0 or 1 in xxx.2021.n.100.1,
whatever the value given in the final exit statement.

This fact matches what seems to be said in the man page of snmpd.conf
where it is written that .100 returns error flag  as integer value 0
or 1.

Is therefore net-snmp behaving differently than ucd-snmp ?
Was the "nice" behaviour I was using in ucd-snmp, in fact a bug ?
If yes, how can I retrieve via snmp a numerical value generated by a
perl script ?

Thanks.

Eric


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
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

Reply via email to