Hello Paul,
thanks but exit code only max 255 (or I am wrong?) but I need 4 digets for example 9999
so is there another way ?
 
 
 
 
Gesendet: Dienstag, 21. April 2020 um 15:36 Uhr
Von: "Paul Herring" <pauljherr...@gmail.com>
An: "Dennis Schneck" <dennisschn...@web.de>
Cc: net-snmp-users@lists.sourceforge.net
Betreff: Re: bash script - extend - output as integer
 
> Note that the exit code (8 in this example) is provided as an INTEGER type and any output is provided as a STRING type.
 
You want get_TempOfRoom1.sh to exit (the return code) with the value you want in the INTEGER, not echo it out.
 
On Tue, Apr 21, 2020 at 1:56 PM Dennis Schneck <dennisschn...@web.de> wrote:
 
Hello,
how to get an integer value from a bash script if using "extend" in /etc/snmp/snmpd.conf ?
 
extend TempOfRoom1 /scripts/get_TempOfRoom1.sh
 
got only STRING but no INTEGER
 
NET-SNMP-EXTEND-MIB::nsExtendOutput1Line."TempOfRoom1" = STRING: 2210

 
like to get:
 
NET-SNMP-EXTEND-MIB::nsExtendResult."TempOfRoom1" = INTEGER: 2210 insted of "NET-SNMP-EXTEND-MIB::nsExtendOutput1Line."TempOfRoom1" = STRING: 2210"
 
Thanks
 
_______________________________________________
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


--
PJH
 
_______________________________________________
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