I am having a little bit of a problem with net-snmp on Ubuntu Jaunty, and also on Debian Lenny (x64). I have both of the agents configured and up and running. I can query anything in the standard MIBs.
My issue is with trying to extend the agent with just the simple shell script. I will post my current snmpd.conf file here.
syslocation "Intern Cube"
#if I comment this next line out the conf works great
#exec echotest /bin/echo hello world
exec testing /bin/sh /tmp/test
disk / 100000
As is if I did an snmp walk it would find the name of shell script (testing) and then it would kill the snmpd process. The script doesn't even start to run before the process dies.
The command I run is:
snmpwalk -v 1 -c public localhost ucdavis
ucdavis is where the scripts are put be default, and the output looks like this:
UCD-SNMP-MIB::memIndex.0 = INTEGER: 0
UCD-SNMP-MIB::memErrorName.0 = STRING: swap
UCD-SNMP-MIB::memTotalSwap.0 = INTEGER: 0
UCD-SNMP-MIB::memAvailSwap.0 = INTEGER: 0
UCD-SNMP-MIB::memTotalReal.0 = INTEGER: 3095572
UCD-SNMP-MIB::memAvailReal.0 = INTEGER: 2452832
UCD-SNMP-MIB::memTotalFree.0 = INTEGER: 2452832
UCD-SNMP-MIB::memMinimumSwap.0 = INTEGER: 16000
UCD-SNMP-MIB::memShared.0 = INTEGER: 0
UCD-SNMP-MIB::memBuffer.0 = INTEGER: 42764
UCD-SNMP-MIB::memCached.0 = INTEGER: 254860
UCD-SNMP-MIB::memSwapError.0 = INTEGER: 1
UCD-SNMP-MIB::memSwapErrorMsg.0 = STRING: Running out of swap space (0)
UCD-SNMP-MIB::extIndex.1 = INTEGER: 1
UCD-SNMP-MIB::extIndex.2 = INTEGER: 2
UCD-SNMP-MIB::extNames.1 = STRING: testing
Timeout: No Response from localhost
I have been working on this for two entire days now. Any help, or additional thoughts would be greatly appreciated. Thank you!