Debian Etch, geen SNMP output

Pagina: 1
Acties:

  • mca2
  • Registratie: Augustus 2000
  • Laatst online: 00:14
Op mijn Debian testing server (Etch) probeer ik SNMP aan de praat te krijgen. Dus om te kijken of alles werkte deed ik:
code:
1
2
3
4
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

Dat werkt dus niet. Dus dan maar een snmpwalk
code:
1
2
Etch:/# snmpwalk -v 1 -c public localhost 
End of MIB

Ok, dus SNMP lijkt er wel te zijn maar ik krijg geen output.

Dus even kijken of SNMP echt wel luistert:
code:
1
2
Etch:/# netstat -natup | grep 161 
udp        0      0 0.0.0.0:161        0.0.0.0:*        6347/snmpd

Dat lijkt me ok.

Nu mijn redelijk karige settings file in /etc/snmp/snmpd.conf
code:
1
2
3
4
5
6
7
8
9
10
# /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

Verder zijn hosts.allow en .deny maagdelijk leeg.

Ziet iemand waar het fout gaat? Of heeft iemand SNMP wel aan de praat onder Etch?

[ Voor 3% gewijzigd door mca2 op 02-01-2007 12:27 ]


  • Seth4Chaos
  • Registratie: Maart 2001
  • Niet online

Seth4Chaos

that's me...

ik mis het volgende stukje config:
code:
1
2
3
4
5
6
7
####
# First, map the community name (COMMUNITY) into a security name
# (local and mynetwork, depending on where the request is coming
# from):

#       sec.name  source          community
com2sec readonly  default         public

Mistakes are proof that you are trying...


  • mca2
  • Registratie: Augustus 2000
  • Laatst online: 00:14
Ik ben er inmiddels uit. Je hebt gelijk, com2sec is wat handiger maar hier lag het niet aan. Het kwam door de startup parameters. Deze staan verstopt in /etc/defaults/snmpd
Deze zijn in Etch:
code:
1
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid 127.0.0.1'


Hierin wordt de smux agent dus uitgezet. Ik zelf had ook wat lopen prutsen en had per ongeluk -I smux achter gelaten. Dan laadt hij smux dus wel in en dat gaat niet goed!

Let op trouwens, dat met deze paramters je alleen vanaf je localhost snmp queries kan doen. Verwijder dus 127.0.0.1 als je vanaf een andere machine snmp queries naar deze wilt doen.

Dus mijn nieuwe entry is geworden
code:
1
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid'

en het werkt als een trein.
Oja, en ter volledigheid de bijbehorende snmpd.conf
code:
1
2
3
4
5
6
7
8
9
#       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

[ Voor 14% gewijzigd door mca2 op 02-01-2007 15:14 ]