[MASOCH-L] RES: RES: Problemas com mrtg / snmp
Márcio A. Sepp
marcio at zyontecnologia.com.br
Mon Nov 24 17:22:12 -03 2008
Bruno,
Segui sua orientação e fiz o seguinte arquivo /etc/snmp/snmp.conf:
# cat /etc/snmp/snmpd.conf
com2sec mynetwork 127.0.0.0/8 public
group MyROGroup any mynetwork
view all included system
view all included interfaces
access MyROGroup "" any noauth 0 all none none
#
Agora, veja as saídas das duas views:
# snmpwalk -v 1 -c public localhost system
SNMPv2-MIB::sysDescr.0 = STRING: OpenBSD crypto.zyontecnologia.com.br 4.4
GENERIC#0 i386
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.12
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (4830) 0:00:48.30
SNMPv2-MIB::sysContact.0 = STRING: nobody at nowhere.invalid
SNMPv2-MIB::sysName.0 = STRING: crypto.zyontecnologia.com.br
SNMPv2-MIB::sysLocation.0 = STRING: somewhere
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (1) 0:00:00.01
SNMPv2-MIB::sysORID.1 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance
SNMPv2-MIB::sysORID.2 = OID: SNMP-MPD-MIB::snmpMPDCompliance
SNMPv2-MIB::sysORID.3 = OID: SNMP-USER-BASED-SM-MIB::usmMIBCompliance
SNMPv2-MIB::sysORID.4 = OID: SNMPv2-MIB::snmpMIB
SNMPv2-MIB::sysORID.5 = OID: TCP-MIB::tcpMIB
SNMPv2-MIB::sysORID.6 = OID: IP-MIB::ip
SNMPv2-MIB::sysORID.7 = OID: UDP-MIB::udpMIB
SNMPv2-MIB::sysORID.8 = OID: SNMP-VIEW-BASED-ACM-MIB::vacmBasicGroup
SNMPv2-MIB::sysORID.9 = OID: IF-MIB::ifMIB
SNMPv2-MIB::sysORDescr.1 = STRING: The SNMP Management Architecture MIB.
SNMPv2-MIB::sysORDescr.2 = STRING: The MIB for Message Processing and
Dispatching.
SNMPv2-MIB::sysORDescr.3 = STRING: The management information definitions
for the SNMP User-based Security Model.
SNMPv2-MIB::sysORDescr.4 = STRING: The MIB module for SNMPv2 entities
SNMPv2-MIB::sysORDescr.5 = STRING: The MIB module for managing TCP
implementations
SNMPv2-MIB::sysORDescr.6 = STRING: The MIB module for managing IP and ICMP
implementations
SNMPv2-MIB::sysORDescr.7 = STRING: The MIB module for managing UDP
implementations
SNMPv2-MIB::sysORDescr.8 = STRING: View-based Access Control Model for SNMP.
SNMPv2-MIB::sysORDescr.9 = STRING: The MIB module to describe generic
objects for network interface sub-layers
SNMPv2-MIB::sysORUpTime.1 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.2 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.3 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.4 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.5 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.6 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.7 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.8 = Timeticks: (1) 0:00:00.01
SNMPv2-MIB::sysORUpTime.9 = Timeticks: (1) 0:00:00.01
Mas a saída para as interfaces continua a mesma. Veja:
# snmpwalk -v 1 -c public localhost interfaces
IF-MIB::ifNumber.0 = INTEGER: 0
End of MIB
#
Att.
Márcio A. Sepp
-----Mensagem original-----
De: masoch-l-bounces at eng.registro.br
[mailto:masoch-l-bounces at eng.registro.br] Em nome de bruno at openline.com.br
Enviada em: segunda-feira, 24 de novembro de 2008 15:47
Para: masoch-l at eng.registro.br
Assunto: Re: [MASOCH-L] RES: Problemas com mrtg / snmp
--- "=?iso-8859-1?Q?M=E1rcio_A._Sepp?=" <marcio at zyontecnologia.com.br>
escreveu:
> Oi Bruno,
> Tenho instalado o net-snmp (do ports).
>
> Vc poderia me enviar algum exemplo do arquivo /etc/snmp/snmpd.conf?
> Tentei inserindo a linha que vc me passou, mas não funcionou.
No proprio arquivo da distribuição vem bastante exemplo (comentado),
basicamente você precisa de 4 coisas (mynetwork e MyROGroup sao nomes que
voce "bola", NETWORK substitua por sua classe C ou quem deseja acesso ao
snmpd. no exemplo, public é a palavra da community, pode usar outra que
quiser)
1) um com2sec (somente sua rede/24 vai poder acessar o servidor)
com2sec mynetwork NETWORK/24 public
2) um group
group MyROGroup any mynetwork
3) um ou mais view (o que voce quer que seja visto, a palavra "all" sera
usado no access para identificar o que pode ser lido)
view all included system
view all included interfaces
4) um access para juntar tudo isso, tipo
access MyROGroup "" any noauth 0 all none none
[]s, !3runo Cabral
__
masoch-l list
https://eng.registro.br/mailman/listinfo/masoch-l
More information about the masoch-l
mailing list