강좌
클라우드/리눅스에 관한 강좌입니다.
네트워크 분류

분석대상 서버 추가하기

작성자 정보

  • 웹관리자 작성
  • 작성일

컨텐츠 정보

본문

icon01.giftitle08.gif

icon04.gif1. cfg파일 생성

 

pobis_2에서 pobis_1.cfg 파일생성 작업시 아래와 같은 에러가 발생하므로,

pobis_2에 있는 /etc/snmp/snmpd.conf 파일을 pobis_1에 그대로 가져가 복사하고

pobis_1에서 snmpd 데몬을 restart시키니까 정상적으로 pobis_1.cfg파일이 생성됨.

 

  <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

[root@pobis_2 bin]# ./cfgmaker --global 'WorkDir: /home/mrtg/www/pobis_1' --global 'Options[_]: bits,growright' --output /home/mrtg/conf/pobis_1.cfg public@ns.kebia.net

--base: Get Device Info on public@ns.kebia.net:

--base: Vendor Id:

--base: Populating confcache

--snpo: Skipping ifName scanning because public@ns.kebia.net: does not seem to support it

--snpo: Skipping ifDescr scanning because public@ns.kebia.net: does not seem to support it

--snpo: Skipping ipAdEntIfIndex scanning because public@ns.kebia.net: does not seem to support it

--snpo: Skipping ifType scanning because public@ns.kebia.net: does not seem to support it

--snpo: Skipping ifPhysAddress scanning because public@ns.kebia.net: does not seem to support it

--base: Get Interface Info

--base: Walking ifIndex

SNMP Error:

Received SNMP response with error code

  error status: noSuchName

  index 1 (OID: 1.3.6.1.2.1.2.2.1.1)

SNMPv1_Session (remote host: "ns.kebia.net" [211.220.193.181].161)

                  community: "public"

                 request ID: 518303757

                PDU bufsize: 8000 bytes

                    timeout: 2s

                    retries: 5

                    backoff: 1)

 at /usr/local/mrtg/bin/../lib/mrtg2/SNMP_util.pm line 540

SNMPWALK Problem for 1.3.6.1.2.1.2.2.1.1 on public@ns.kebia.net:

 at ./cfgmaker line 107

--base: Walking ifType

SNMP Error:

Received SNMP response with error code

  error status: noSuchName

  index 1 (OID: 1.3.6.1.2.1.2.2.1.3)

SNMPv1_Session (remote host: "ns.kebia.net" [211.220.193.181].161)

                  community: "public"

                 request ID: 518303758

                PDU bufsize: 8000 bytes

                    timeout: 2s

                    retries: 5

                    backoff: 1)

 at /usr/local/mrtg/bin/../lib/mrtg2/SNMP_util.pm line 540

SNMPWALK Problem for 1.3.6.1.2.1.2.2.1.3 on public@ns.kebia.net:

 at ./cfgmaker line 107

--base: Walking ifSpeed

SNMP Error:

Received SNMP response with error code

  error status: noSuchName

  index 1 (OID: 1.3.6.1.2.1.2.2.1.5)

SNMPv1_Session (remote host: "ns.kebia.net" [211.220.193.181].161)

                  community: "public"

                 request ID: 518303759

                PDU bufsize: 8000 bytes

                    timeout: 2s

                    retries: 5

                    backoff: 1)

 at /usr/local/mrtg/bin/../lib/mrtg2/SNMP_util.pm line 540

SNMPWALK Problem for 1.3.6.1.2.1.2.2.1.5 on public@ns.kebia.net:

 at ./cfgmaker line 107

--base: Walking ifAdminStatus

SNMP Error:

Received SNMP response with error code

  error status: noSuchName

  index 1 (OID: 1.3.6.1.2.1.2.2.1.7)

SNMPv1_Session (remote host: "ns.kebia.net" [211.220.193.181].161)

                  community: "public"

                 request ID: 518303760

                PDU bufsize: 8000 bytes

                    timeout: 2s

                    retries: 5

                    backoff: 1)

 at /usr/local/mrtg/bin/../lib/mrtg2/SNMP_util.pm line 540

SNMPWALK Problem for 1.3.6.1.2.1.2.2.1.7 on public@ns.kebia.net:

 at ./cfgmaker line 107

--base: Walking ifOperStatus

SNMP Error:

Received SNMP response with error code

  error status: noSuchName

  index 1 (OID: 1.3.6.1.2.1.2.2.1.8)

SNMPv1_Session (remote host: "ns.kebia.net" [211.220.193.181].161)

                  community: "public"

                 request ID: 518303761

                PDU bufsize: 8000 bytes

                    timeout: 2s

                    retries: 5

                    backoff: 1)

 at /usr/local/mrtg/bin/../lib/mrtg2/SNMP_util.pm line 540

SNMPWALK Problem for 1.3.6.1.2.1.2.2.1.8 on public@ns.kebia.net:

 at ./cfgmaker line 107

--base: Writing /home/mrtg/conf/pobis_1.cfg

[root@pobis_2 bin]# ps -ef | grep snmp 

root     15275     1  0 20:35 pts/1    00:00:00 /usr/sbin/snmpd

[root@pobis_2 bin]#

[root@pobis_2 bin]#

[root@pobis_2 bin]# ./cfgmaker --global 'WorkDir: /home/mrtg/www/pobis_1' --global 'Options[_]: bits,growright' --output /home/mrtg/conf/pobis_1.cfg public@ns.kebia.net

--base: Get Device Info on public@ns.kebia.net:

--base: Vendor Id:

--base: Populating confcache

--snpo: Skipping ifName scanning because public@ns.kebia.net: does not seem to support it

--snpo: confcache public@ns.kebia.net: Descr lo0 --> 1

--snpo: confcache public@ns.kebia.net: Descr eth0 --> 2

--snpo: confcache public@ns.kebia.net: Ip 127.0.0.1 --> 1

--snpo: confcache public@ns.kebia.net: Ip 211.220.193.181 --> 2

--snpo: confcache public@ns.kebia.net: Type 24 --> 1

--snpo: confcache public@ns.kebia.net: Type 6 --> 2

--snpo: confcache public@ns.kebia.net: Eth  --> 1

--snpo: confcache public@ns.kebia.net: Eth 00-d0-b7-a7-7a-75 --> 2

--base: Get Interface Info

--base: Walking ifIndex

--base: Walking ifType

--base: Walking ifSpeed

--base: Walking ifAdminStatus

--base: Walking ifOperStatus

--base: Writing /home/mrtg/conf/pobis_1.cfg

[root@pobis_2 bin]#

[root@pobis_2 bin]#

[root@pobis_2 bin]#


icon04.gif2. cfg파일 생성확인

 

 

[root@pobis_2 bin]# cd /home/mrtg/conf

[root@pobis_2 conf]# ls -l

total 8

-rw-r--r--    1 root     root         2647 Jul 21 21:20 pobis_1.cfg

-rw-r--r--    1 root     root         2670 Jul 21 20:35 pobis_2.cfg

-rw-r--r--    1 root     root            0 Jul 21 21:20 pobis_2.ok

[root@pobis_2 conf]#

[root@pobis_2 conf]#

 


icon04.gif3. crontab에 등록

 

 

[root@pobis_2 conf]# crontab -e

0,5,10,15,20,25,30,35,40,45,50,55 * * * *  /usr/local/mrtg/bin/mrtg /home/mrtg/conf/pobis_2.cfg

0,5,10,15,20,25,30,35,40,45,50,55 * * * *  /usr/local/mrtg/bin/mrtg /home/mrtg/conf/pobis_1.cfg


~

"crontab.15421" 2L, 192C written

crontab: installing new crontab

[root@pobis_2 conf]#

[root@pobis_2 conf]#

[root@pobis_2 conf]# cd /usr/local/mrtg/bin

[root@pobis_2 bin]# ls -l

total 260

-rwxr-xr-x    1 510      ftp         73110 Jul 21 20:24 cfgmaker

-rwxr-xr-x    1 510      ftp         15817 Jul 21 20:24 indexmaker

-rwxr-xr-x    1 510      ftp         62449 Jul 21 20:24 mrtg

-rwxr-xr-x    1 root     root        94508 Jul 21 20:24 rateup

[root@pobis_2 bin]#

[root@pobis_2 bin]#

icon04.gif4. mrtg 실행테스트

 

 

[root@pobis_2 bin]# ./mrtg /home/mrtg/conf/pobis_1.cfg

Rateup WARNING: /usr/local/mrtg/bin/rateup could not read the primary log file for ns.kebia.net_2

Rateup WARNING: /usr/local/mrtg/bin/rateup The backup log file for ns.kebia.net_2 was invalid as well

Rateup WARNING: /usr/local/mrtg/bin/rateup Can't remove ns.kebia.net_2.old updating log file

Rateup WARNING: /usr/local/mrtg/bin/rateup Can't rename ns.kebia.net_2.log to ns.kebia.net_2.old updating log file

[root@pobis_2 bin]#

[root@pobis_2 bin]#

[root@pobis_2 bin]# !!

./mrtg /home/mrtg/conf/pobis_1.cfg

Rateup WARNING: /usr/local/mrtg/bin/rateup Can't remove ns.kebia.net_2.old updating log file

[root@pobis_2 bin]#

[root@pobis_2 bin]#

[root@pobis_2 bin]# !!

./mrtg /home/mrtg/conf/pobis_1.cfg

[root@pobis_2 bin]#

[root@pobis_2 bin]#

[root@pobis_2 bin]# !!

./mrtg /home/mrtg/conf/pobis_1.cfg

[root@pobis_2 bin]# !!

./mrtg /home/mrtg/conf/pobis_1.cfg

 

[root@pobis_2 bin]#

[root@pobis_2 bin]# cd /home/mrtg/www/pobis_1

[root@pobis_2 pobis_1]#

[root@pobis_2 pobis_1]#


icon04.gif5. 결과파일 생성확인

 

 

[root@pobis_2 pobis_1]# ls -l

total 120

-rw-r--r--    1 root     root         1434 Jul 21 21:22 ns.kebia.net_2-day.png

-rw-r--r--    1 root     root         1330 Jul 21 21:22 ns.kebia.net_2-month.png

-rw-r--r--    1 root     root         1397 Jul 21 21:22 ns.kebia.net_2-week.png

-rw-r--r--    1 root     root         1743 Jul 21 21:22 ns.kebia.net_2-year.png

-rw-r--r--    1 root     root         8155 Jul 21 21:22 ns.kebia.net_2.html

-rw-r--r--    1 root     root        45681 Jul 21 21:22 ns.kebia.net_2.log

-rw-r--r--    1 root     root        45679 Jul 21 21:22 ns.kebia.net_2.old

[root@pobis_2 pobis_1]#

[root@pobis_2 pobis_1]#


관련자료

댓글 0
등록된 댓글이 없습니다.

공지사항


뉴스광장


  • 현재 회원수 :  60,037 명
  • 현재 강좌수 :  35,810 개
  • 현재 접속자 :  101 명