mrtg 모니터링 대상 추가하고 싶은데 안되네요..;;
지금 mrtg를 구축해보고 있는데 로컬(192.168.0.172)는 잘됩니다
그래서 0.1도 추가해서 mrtg로 보고싶은데 안되네요...뭐가 문제일까요?
snmp.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:
# Make at least snmpwalk -v 1 localhost -c public system fast again.
# name incl/excl subtree mask(optional)
view systemview included .1.3.6.1.2.1.1
view systemview included .1.3.6.1.2.1.25.1.1
####
# 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
# Here is a commented out example configuration that allows less
# restrictive access.
# YOU SHOULD CHANGE THE "COMMUNITY" TOKEN BELOW TO A NEW KEYWORD ONLY
# KNOWN AT YOUR SITE. YOU *MUST* CHANGE THE NETWORK TOKEN BELOW TO
# SOMETHING REFLECTING YOUR LOCAL NETWORK ADDRESS SPACE.
## sec.name source community
com2sec local localhost test
com2sec local 192.168.0.1 test
com2sec local 192.168.0.210 test
com2sec mynetwork 192.168.0.0/24 test
## group.name sec.model sec.name
group MyRWGroup v2c local
group MyROGroup v2c mynetwork
#
#group MyRWGroup any otherv3user
#...
## incl/excl subtree mask
view all included .1 80
## -or just the mib2 tree-
#view mib2 included .iso.org.dod.internet.mgmt.mib-2 fc
## context sec.model sec.level prefix read write notif
access MyROGroup "" v2c noauth exact all none none
access MyRWGroup "" v2c noauth exact all all all
# 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 roview rwview none
access testgroup "" any noauth exact all all all
snmp는 위처럼 설정을 했구요 snmpwalk를 통해 0.1을 검색하면 불러오지를 못합니다. 0.1의 161,162포트는 다 열려있구요.
검색안되도 일단 cfgmaker를 돌려봤는데요.
mrtg.cfg
# Created by
# /usr/bin/cfgmaker --snmp-option=:::::2 --ifref=descr --ifdesc=descr test@192.168.0.1
### Global Config Options
# for UNIX
# WorkDir: /home/http/mrtg
# or for NT
# WorkDir: c:\mrtgdata
### Global Defaults
# to get bits instead of bytes and graphs growing to the right
# Options[_]: growright, bits
EnableIPv6: no
######################################################################
# System:
# Description:
# Contact:
# Location:
######################################################################
이런 결과가 나오네요
다시 한번 정리하자면
저는 지금 mrtg를 공부 중이고 로컬인 192.168.0.172는 매우 간단하고 빠르게 구축했습니다.
그래서 192.168.0.1을 추가하고 싶어 snmp.conf에 커뮤니티값과 함께 추가를 했는데 snmpwalk도 안되고 cfg파일도 안만들어 집니다.
ps 192.168.0.210은 0.1이 안되어서 추가했는데 이것은 또 다른 vm입니다.
댓글 달기