Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
add comment

2 Answers

Any errors in obtaining the information described above are reported by means of the 1.3.6.1.4.1.2021.101.1.100 flag and the 1.3.6.1.4.1.2021.101.1.101 text-string description.

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"

share|improve this answer
    
I get no answer from snmpwalk -Os -c public -v 1 myip .1.3.6.1.4.1.2021.8 while snmpwalk -Os -c public -v 1 myip .1.3.6.1.4.1.2021.101 gives snmperrIndex.0 = INTEGER: 0 snmperrNames.0 = STRING: snmp snmperrErrorFlag.0 = INTEGER: 0 snmperrErrMessage.0 = STRING: both with trailing dot and without in the snmpd.conf exec OID (empty snmpd.log as usual) –  golemwashere Dec 16 '09 at 18:10
add comment
up vote 0 down vote accepted

I found out the answer:

the proper config file is

/etc/sma/snmp/snmpd.conf

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.