I am trying to execute a script through a SNMP GET using Net-Snmp included in the latest Solaris 10 (10/09 s10s_u8wos_08a SPARC).
I have a non-global zone which runs NET-SNMP version 5.0.9 patched to the last SMA patch (120272-26).
The zone responds to a snmpwalk but if I add something like
exec 1.3.6.1.4.1.2021.8.1.100 test /bin/echo "hello golem"
in /etc/snmp/conf/snmpd.conf and restart:
svcadm restart sma
if I try to walk .1.3.6.1.4.1.2021.8 (UCD-SNMP-MIB::extTable) I get no objects.
In other similar cases I solved installing the version from sunfreeware.com but it looks like the current version (netsnmp-5.4.2.1-sol10-sparc-local) is not working inside a zone.
Does anyone know how to enable the extTable tree? What is really strange is that the man page for snmpd.conf shows the exec command and the demon says it's capable to understand exec:
prompt# /usr/sfw/sbin/snmpd -H 2>&1| grep exec
exec [miboid] name program arguments
PS I get no hints from /var/log/snmpd.log
Check content of
.1.3.6.1.4.1.2021.101.1.101
after checking.1.3.6.1.4.1.2021.8.1.100
. You should also try adding.
before your OID in the exec line, so:exec .1.3.6.1.4.1.2021.8.1.100 test /bin/echo "hello golem"
I found out the answer:
the proper config file is
as I found out reading this blog entry. Adding the exec lines there gives the proper result.
It would be nice to know what the heck /etc/snmp/conf/snmpd.conf is used for and why solaris people choose to use the other location as the main one.