On 9 October 2010 17:01, Angelo Höngens <a.hong...@netmatch.nl> wrote:
>> Use the return code of the script, rather than the output
>> See  UCD-SNMP-MIB::extResult or NET-SNMP-MIB::nsExtendResult

> I'm not quite sure what you mean. I only get string values back:
>
> $ snmpwalk -v 1 -c public localhost 1.3.6.1.4.1.2021.54

> UCD-SNMP-MIB::ucdavis.54.101.0.3.1.1.4.116.101.115.116 = STRING: "123"
> UCD-SNMP-MIB::ucdavis.54.101.0.3.1.2.4.116.101.115.116 = STRING: "123"
> UCD-SNMP-MIB::ucdavis.54.101.0.3.1.3.4.116.101.115.116 = INTEGER: 1
> UCD-SNMP-MIB::ucdavis.54.101.0.3.1.4.4.116.101.115.116 = INTEGER: 0

No - you get two string values ("123" and "123"), and two integer
values (1 and 0)

If you define the same extension command rooted at the default location
(NET-SNMP-EXTEND-MIB::nsExtendObjects), the results would be shown
as follows:


   NET-SNMP-EXTEND-MIB::nsExtendOutput1Line."test" = STRING: "123"
   NET-SNMP-EXTEND-MIB::nsExtendOutputFull."test" = STRING: "123"
   NET-SNMP-EXTEND-MIB::nsExtendOutputNumLines."test" = INTEGER: 1
   NET-SNMP-EXTEND-MIB::nsExtendResult."test" = INTEGER: 0


Try with
   extend .1.3.6.1.4.1.2021.54.101.0 test "exit 123"
or
   extend                               test "exit 123"

Dave

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
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