일요일, 5월 26, 2024
Homeubuntu SNMP 설치 및 설정

ubuntu SNMP 설치 및 설정

ubuntu SNMP 설치 및 설정

1.apt-get snmpd snmp rrdtool

2.snmpd.conf 백업

mv /etc/snmp/snmpd.coonf /etc/snmp/snmpd.conf.default

3.iostat-persist.pl 다운로드

cd /usr/local/bin

wget --no-check-certificate https://raw.githubusercontent.com/markround/Cacti-iostat-templates/master/scripts/iostat-persist.pl

4.snmpd.conf생성

vi /etc/snmp/snmpd.conf

syslocation  "SNMP Location Name"
syscontact  master@localhost

#        sec.name       source        community
com2sec   local       127.0.0.1        snmpComm
com2sec   privateUser 192.168.0.0/16   snmpComm

#        groupName    securityModel   securityName
group   localGroup         v1           local
group   localGroup         v2c          local
group   privateGroup       v1           privateUser
group   privateGroup       v2c          privateUser

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

##          incl/excl subtree  mask
view all    included     .1     80

# iostat
pass_persist .1.3.6.1.3.1 /usr/bin/perl /usr/local/bin/iostat-persist.pl

5./etc/default/snmpd 수정

vi /etc/default/snmpd

#기존 SNMPDOPTS 주석처리
#SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -g snmp -I -smux,mteTrigger,mteTriggerConf -p /var/run/snmpd.pid'

#아래 내용으로 추가
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -p /var/run/snmpd.pid -c /etc/snmp/snmpd.conf'

6.service snmpd restart

7.snmpwalk (snmp확인)

snmpwalk -v2c -c snmpComm localhost .1
RELATED ARTICLES

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Time limit exceeded. Please complete the captcha once again.

Most Popular