https://docs.fedoraproject.org/en-US/Fedora/18/html/System_Administrators_Guide/sect-System_Monitoring_Tools-Net-SNMP-Extending.html
> 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