Re: returned value differ : from shell or from snmpd
Pierre LEBRECH <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
Thanks Dave. But how to get the env value via SNMP? Dave Shield wrote: > On 16/08/06, Pierre LEBRECH <[email protected]> wrote: > >> here is the line I have in snmpd.conf : >> exec .1.3.6.1.4.1.2021.8.5.101.1 check_raid /bin/bash >> /usr/local/bin/check_raid.sh > > >> In a root shell, I have this output : >> OK: LSI Megaraid 1030 Volume State Optimal > > >> But now with SNMP, in a root shell, I have this : >> .1.3.6.1.4.1.2021.8.5.101.1.101.1 = STRING: "CRITICAL: NO RAID FOUND" > > > It's clear that the script *is* being run (since this is one possible > valid output). > So it's not a question of the shell path not finding the python or > other binaries. > > It's probably down to some other difference in the environment between > an interactive session, and the SNMP agent. Try using 'env' to dump > the full environment to a temporary file, and compare the results when > invoking things manually vs via SNMP. > > Any differences (particularly relating to python or anything that the > various "check_xxx" routines could rely on) might reveal the > underlying cause. > > Dave ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ 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