snmpd krijg hem maar niet voorelkaar :(

Pagina: 1
Acties:

  • Haranaka
  • Registratie: September 2000
  • Laatst online: 19:25
Vroeger op mijn redhat 7 bak had ik mrtg draaien. En gister avond kreeg ik het idee om dat weer op mijn
server te zetten (heb inmiddels andere server). Op de server draait Suse 8.0.
Ik ben tot gister laat in de nacht doorgegaan om hem aan de praat te krijgen maar het me lukt niet :(

Toen met Redhat ging ook niet alles van een lijen dakje, maar daar kon ik vrij gemakkelijk de oude snmp.conf
weggooien en toen maakte hij zelf een standaard nieuwe aan. Suse doet dat niet. Maar dankzij internet/got zoeken
heb ik toch een config inelkaar weten te draaien. Maar zoals je al aanvoelt, hij doet ut niet...
Ik heb er enorm veel mee liggen editen en stoeien, maar niets leek te baten. Wel kreeg ik soms andere errors :)
Maar ik heb besloten hem maar in de "pure" vom hier neer te zetten, dan snappen jullie het waarschijnlijk beter.

Ik hoop dat iemand me kan en wil helpen

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Server:/home/diederik # rcsnmpd restart
Shutting down snmpd:                                                                                                     done
Starting snmpd:                                                                                                          done
Server:/home/diederik #
Server:/home/diederik #
Server:/home/diederik # snmpwalk -v1 localhost public
system.sysDescr.0 = Linux Server 2.4.18-4GB #1 Wed May 29 15:47:24 UTC 2002 i686
system.sysObjectID.0 = OID: enterprises.ucdavis.ucdSnmpAgent.linux
system.sysUpTime.0 = Timeticks: (387) 0:0
system.sysContact.0 = Sysadmin (root@localhost)
system.sysName.0 = Server
system.sysLocation.0 = Server Room
system.sysORLastChange.0 = Timeticks: (0) 0:0
system.sysORTable.sysOREntry.sysORID.1 = OID: ifMIB
system.sysORTable.sysOREntry.sysORID.2 = OID: .iso.org.dod.internet.snmpV2.snmpModules.snmpMIB
system.sysORTable.sysOREntry.sysORID.3 = OID: tcpMIB
system.sysORTable.sysOREntry.sysORID.4 = OID: ip
system.sysORTable.sysOREntry.sysORID.5 = OID: udpMIB
system.sysORTable.sysOREntry.sysORID.6 = OID: .iso.org.dod.internet.snmpV2.snmpModules.snmpVacmMIB.vacmMIBConformance.vacmMIBGroups.vacmBasicGroup
system.sysORTable.sysOREntry.sysORID.7 = OID: .iso.org.dod.internet.snmpV2.snmpModules.snmpFrameworkMIB.snmpFrameworkMIBConformance.snmpFrameworkMIBCompliances.snmpFrameworkMIBCompliance
system.sysORTable.sysOREntry.sysORID.8 = OID: .iso.org.dod.internet.snmpV2.snmpModules.snmpMPDMIB.snmpMPDMIBConformance.snmpMPDMIBCompliances.snmpMPDCompliance
system.sysORTable.sysOREntry.sysORID.9 = OID: .iso.org.dod.internet.snmpV2.snmpModules.snmpUsmMIB.usmMIBConformance.usmMIBCompliances.usmMIBCompliance
system.sysORTable.sysOREntry.sysORDescr.1 = The MIB module to describe generic objects for network interface sub-layers
system.sysORTable.sysOREntry.sysORDescr.2 = The MIB module for SNMPv2 entities
system.sysORTable.sysOREntry.sysORDescr.3 = The MIB module for managing TCP implementations
system.sysORTable.sysOREntry.sysORDescr.4 = The MIB module for managing IP and ICMP implementations
system.sysORTable.sysOREntry.sysORDescr.5 = The MIB module for managing UDP implementations
system.sysORTable.sysOREntry.sysORDescr.6 = View-based Access Control Model for SNMP.
system.sysORTable.sysOREntry.sysORDescr.7 = The SNMP Management Architecture MIB.
system.sysORTable.sysOREntry.sysORDescr.8 = The MIB for Message Processing and Dispatching.
system.sysORTable.sysOREntry.sysORDescr.9 = The management information definitions for the SNMP User-based Security Model.
system.sysORTable.sysOREntry.sysORUpTime.1 = Timeticks: (0) 0:0
system.sysORTable.sysOREntry.sysORUpTime.2 = Timeticks: (0) 0:0
system.sysORTable.sysOREntry.sysORUpTime.3 = Timeticks: (0) 0:0
system.sysORTable.sysOREntry.sysORUpTime.4 = Timeticks: (0) 0:0
system.sysORTable.sysOREntry.sysORUpTime.5 = Timeticks: (0) 0:0
system.sysORTable.sysOREntry.sysORUpTime.6 = Timeticks: (0) 0:0
system.sysORTable.sysOREntry.sysORUpTime.7 = Timeticks: (0) 0:0
system.sysORTable.sysOREntry.sysORUpTime.8 = Timeticks: (0) 0:0
system.sysORTable.sysOREntry.sysORUpTime.9 = Timeticks: (0) 0:0
Timeout: No Response from localhost
Server:/home/diederik #
Server:/home/diederik #
Server:/home/diederik # ps -A | grep snmp
13959 pts/16   00:00:00 snmpconf
14022 pts/16   00:00:00 snmpwalk
16167 pts/17   00:00:04 snmpd
Server:/home/diederik #


code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
##########################################################################
#
# snmpd.conf
#
###########################################################################

####
# First, map the community name "public" into a "security name"

#        sec.name  source           community
com2sec notConfigUser  default   public

####
# Second, map the security name into a group name:

#        groupName      securityModel securityName
group   notConfigGroup v1            notConfigUser
group   notConfigGroup v2c           notConfigUser

####
# Third, create a view for us to let the group have rights to:

#        name        incl/excl     subtree         mask(optional)
view    systemview     included system

####
# Finally, grant the group read-only access to the systemview view.

#        group      context sec.model sec.level prefix read   write  notif
access  notConfigGroup ""       any      noauth    exact  systemview none none

...


Verwijderd

Maak eens een lege snmpd.conf en herstart snmpd :) Misschien niet safe, maar aangezien je toch maar vanaf localhost kan connecten, werkt t prima ;)

Ik zou het zo iig eerst ff proberen ;)

[ Voor 59% gewijzigd door Verwijderd op 19-02-2003 11:18 ]


  • Haranaka
  • Registratie: September 2000
  • Laatst online: 19:25
Zoals ik al zei, vroeger onder Redhat werkte dat wel, onder SuSe lukt me dat niet ;(
Als ik
/usr/share/snmp/snmpd.conf leeg haal en hem restart, geeft snmpwalk alleen een "Timeout: No Response from localhost".
Ook de hele file delte verandert niets aan de zaak.

...


  • Haranaka
  • Registratie: September 2000
  • Laatst online: 19:25
Joepie :)
Deze snmpd.conf heb ik nu, deze geeft geen errors met snmpwalk, maar wel een heleboel output zoals het hoort.


code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
####
# First, map the community name "public" into a "security name"

#        sec.name  source           community
com2sec public    localhost      public

####
# Second, map the security name into a group name:

#        groupName      securityModel securityName
group   public     v1           public
group   public     v2c       public
group   public     usm       public

####
# Third, create a view for us to let the group have rights to:

#        name        incl/excl     subtree         mask(optional)
view    all             included        .1

####
# Finally, grant the group read-only access to the systemview view.

#        group      context sec.model sec.level prefix read   write  notif
access  public     ""   any      noauth    exact  all    none   none



Nu heb ik mrtg ook weer aan de praat gekregen.

Ik ben alleen benieuwd hoe ik voorelkaar krijg in de mrtg.cfg dat ik van verschillenden interfaces plaatjes maak in 1 html pagina?

Dus hoe lang ik bv alleen de weekly grafiek van 2 iterfaces onder elkaar plakken?

...


Verwijderd

Haranaka schreef op 19 februari 2003 @ 14:20:
Joepie :)
Deze snmpd.conf heb ik nu, deze geeft geen errors met snmpwalk, maar wel een heleboel output zoals het hoort.


code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
####
# First, map the community name "public" into a "security name"

#        sec.name  source           community
com2sec public    localhost      public

####
# Second, map the security name into a group name:

#        groupName      securityModel securityName
group   public     v1           public
group   public     v2c       public
group   public     usm       public

####
# Third, create a view for us to let the group have rights to:

#        name        incl/excl     subtree         mask(optional)
view    all             included        .1

####
# Finally, grant the group read-only access to the systemview view.

#        group      context sec.model sec.level prefix read   write  notif
access  public     ""   any      noauth    exact  all    none   none



Nu heb ik mrtg ook weer aan de praat gekregen.

Ik ben alleen benieuwd hoe ik voorelkaar krijg in de mrtg.cfg dat ik van verschillenden interfaces plaatjes maak in 1 html pagina?

Dus hoe lang ik bv alleen de weekly grafiek van 2 iterfaces onder elkaar plakken?
Zelf een html page maken met de linkjes naar de weekly-graphs? :)

  • Haranaka
  • Registratie: September 2000
  • Laatst online: 19:25
Doh, waarom bedacht ik me dat niet |:(
Ik zat meer te denken aan de mrtg.cfg zodanig aan te passen...

...


  • DGTL_Magician
  • Registratie: Februari 2001
  • Laatst online: 15-04 15:04

DGTL_Magician

Kijkt regelmatig vooruit

Haranaka schreef op 19 February 2003 @ 17:40:
Doh, waarom bedacht ik me dat niet |:(
Ik zat meer te denken aan de mrtg.cfg zodanig aan te passen...
Daar gebruik je dus indexmaker van mrtg voor. Syntax:
code:
1
indexmaker /etc/mrtg.cfg > /var/www/html/mrtg/index.html

Blog | aaZoo - (Wireless) Networking, Security, DDoS Mitigatie, Virtualisatie en Storage


Verwijderd

# group context sec.model sec.level prefix read write notif
access notConfigGroup "" any noauth exact systemview none none
Daar lag het aan.
systemview -> all veranderen had geholpen.

Echter, ik zou als ik jou was even extern_interface udp 161 blocken. Het gaat anderen niet zozeer iets aan wat... euhm... je systeem voor bepaalde statistiekjes heeft _lijkt mij_.

  • Haranaka
  • Registratie: September 2000
  • Laatst online: 19:25
Ik heb poort 161 geblokt in de firewall, dat kan toch ook?

...


Verwijderd

161/udp? Jawel hoor :)
Pagina: 1