No SNMP output on Etch

I'm trying to get some snmp info from my Debian Etch (testing) box. But
i don't seem to get any output.
Etch:/# snmpget -v 1 -c public localhost system.sysUpTime.0
Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: DISMAN-EVENT-MIB::sysUpTimeInstance

So i tried a simple snmpwalk, but that also gives me nothing:
Etch:/# snmpwalk -v 1 -c public localhost
End of MIB

I've verified that snmpd is listening:
Etch:/# netstat -natup | grep 161
udp 0 0 0.0.0.0:161 0.0.0.0:* 6347/snmpd
So that seems ok.

I've created this bare settings file in /etc/snmp/snmpd.conf
# /etc/snmp/snmpd.conf
# sec.name source community
trapsink readonly localhost public
# sec.model sec.name
group MyROGroup v1 readonly
# incl/excl subtree mask
view all included .1 80
# context sec.model sec.level match read write notif
access MyROGroup "" any noauth exact all none none
# end of file
And stopped en started snmpd (restart only stops snmpd, this seems like
a bug). But still no results on snmpwalk:
Etch:/# snmpwalk -v 1 -c public localhost
End of MIB

Any ideas where things go wrong? Or anyone that has got snmpwalk
working on Etch?

--

0

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

No SNMP output on Etch

Bart wrote:
> I'm trying to get some snmp info from my Debian Etch (testing) box. But
> i don't seem to get any output.
> Etch:/# snmpget -v 1 -c public localhost system.sysUpTime.0
> Error in packet
> Reason: (noSuchName) There is no such variable name in this MIB.
> Failed object: DISMAN-EVENT-MIB::sysUpTimeInstance
>
> So i tried a simple snmpwalk, but that also gives me nothing:
> Etch:/# snmpwalk -v 1 -c public localhost
> End of MIB
>
> I've verified that snmpd is listening:
> Etch:/# netstat -natup | grep 161
> udp 0 0 0.0.0.0:161 0.0.0.0:* 6347/snmpd
> So that seems ok.
>
> I've created this bare settings file in /etc/snmp/snmpd.conf
> # /etc/snmp/snmpd.conf
> # sec.name source community
> trapsink readonly localhost public
> # sec.model sec.name
> group MyROGroup v1 readonly
> # incl/excl subtree mask
> view all included .1 80
> # context sec.model sec.level match read write notif
> access MyROGroup "" any noauth exact all none none
> # end of file
> And stopped en started snmpd (restart only stops snmpd, this seems like
> a bug). But still no results on snmpwalk:
> Etch:/# snmpwalk -v 1 -c public localhost
> End of MIB
>
> Any ideas where things go wrong? Or anyone that has got snmpwalk
> working on Etch?

Ok, so after a week trying i finally got it. First off all the
/etc/snmp/snmpd.conf could just simple be (dunno exactly about all the
com2sec, trapsink etc keywords):
# sec.name source community
com2sec readonly default public
# sec.model sec.name
group MyROGroup v1 readonly
# incl/excl subtree mask
view all included .1 80
view system included .iso.org.dod.internet.mgmt.mib-2.system
# context sec.model sec.level match read write notif
access MyROGroup "" any noauth exact all none none

And then I found the problem, it was in the command line paramters for
smpd. These are 'hidden' in /etc/defaults/snmpd. I had modified these,
to take out the 127.0.0.1 bit, otherwise only local snmp queries are
answered. But by mistake I had also remved the - in front of smux,
causing smux to be loaded which caused my problems. So,
/etc/defaults/snmpd now reads:

# This file controls the activity of snmpd and snmptrapd</p>
<p># MIB directories.  /usr/share/snmp/mibs is the default, but<br />
# including it here avoids some strange problems.<br />
export MIBDIRS=/usr/share/snmp/mibs</p>
<p># snmpd control (yes means start daemon).<br />
SNMPDRUN=yes</p>
<p># snmpd options (use syslog, close stdin/out/err).<br />
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid'</p>
<p># snmptrapd control (yes means start daemon).  As of net-snmp version<br />
# 5.0, master agentx support must be enabled in snmpd before snmptrapd<br />
# can be run.  See snmpd.conf(5) for how to do this.<br />
TRAPDRUN=no</p>
<p># snmptrapd options (use syslog).<br />
TRAPDOPTS='-Lsd -p /var/run/snmptrapd.pid'<br />

Which is nearly identical to the distributed version, expect for the
removed 127.0.0.1.

--

Syndicate content