RadarURL
Skip to content
조회 수 636 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

mrtg 2.16.2 설치관련

-------------------------------------------------------------------------------------------
# yum install -y snmpd* mrtg*
-------------------------------------------------------------------------------------------

 

계정은 /home/ifull/public_html/mrtg2를 기준으로 작성되었다.

 

-------------------------------------------------------------------------------------------
# service snmpd start
-------------------------------------------------------------------------------------------
 snmpd 데몬을 실행을 해줘야함.
 snmpd 자동실행시
 # chkconfig --level 345 snmpd on

 

-------------------------------------------------------------------------------------------
# vi /etc/snmp/snmp.conf

       #com2sec notConfigUser  default       public
  42 com2sec local    localhost        public
  43 com2sec network  192.168.0.123   public

       #group   notConfigGroup v1           notConfigUser
  49 group   notConfigGroup v2c           notConfigUser
  50 group   rwgroup         v1      local
  51 group   rwgroup         v2c     local
  52 group   rwgroup         v1      network
  53 group   rwgroup         v2c     network

       #view    systemview    included   .1.3.6.1.2.1.1
  61 #view    systemview    included   .1.3.6.1.2.1.25.1.1
  62 view    all             included        .1      80
  63 view    systemview      included        system
  64 view    mib2            included        .iso.org.dod.internet.mgmt.mib-2 fc

       #access  notConfigGroup ""      any       noauth    exact  systemview none none
  71 access  rwgroup ""      any     noauth  exact   all     all     all
  72 access  rwgroup ""      any     noauth  exact   systemview      none    none

  앞자리는 대략 라인 설명

 저장 완료
-------------------------------------------------------------------------------------------

 

-------------------------------------------------------------------------------------------
# cfgmaker --global 'WorkDir: /home/ifull/public_html/mrtg' --global 'Language: korean' --global 'Options[_]: bits,growright' --output /home/ifull/public_html/mrtg/cfg/mrtg.cfg public@서버아이피
-------------------------------------------------------------------------------------------
 --global 'Language: korean'   한글로 출력하기

 

 실행시 에러부분
 SNMP Error:
 Received SNMP response with error code
   error status: noSuchName
   index 2 (OID: 1.3.6.1.4.1.2021.10.1.3.3)
 SNMPv1_Session (remote host: "localhost" [서버아이피].161)
       community: "public"
     request ID: 1356710722
     PDU bufsize: 8000 bytes
      timeout: 2s
      retries: 5
      backoff: 1)
  at /usr/local/mrtg/bin/../lib/mrtg2/SNMP_util.pm line 490
 SNMPGET Problem for .1.3.6.1.4.1.2021.10.1.3.2 .1.3.6.1.4.1.2021.10.1.3.3 sysUptime sysName on public@서버아이피::::::v4only
   at /usr/local/mrtg/bin/mrtg line 2035

 

 161 에러는 포트를 열어줘야함. iptables 사용중이면
 # vi /etc/sysconfig/iptables
 -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 161 -j ACCEPT

 

 v4only 에러는 ipv6를 닫아주면 됨.
  링크로 처리함.
  http://ifull.co.kr/xe/206029
  추가 작성함.

 

  에러숫자에 따라서 처리 방식이 조금씩 다름니다. 확인 해주시면 됩니다.

 


환경파일 생성
-------------------------------------------------------------------------------------------
# indexmaker --title "mailer MRTG" --output /home/ifull/public_html/mrtg/index.htm /home/ifull/public_html/mrtg/cfg/mrtg.cfg
-------------------------------------------------------------------------------------------

 

환경파일로 mrtg정보확인
-------------------------------------------------------------------------------------------
# LANG=C LC_ALL=C /usr/bin/mrtg /home/ifull/public_html/mrtg2/cfg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok
2013-08-17 11:29:59, Rateup WARNING: /usr/bin/rateup could not read the primary log file for 서버아이피_2
2013-08-17 11:29:59, Rateup WARNING: /usr/bin/rateup The backup log file for 서버아이피_2 was invalid as well
2013-08-17 11:29:59, Rateup WARNING: /usr/bin/rateup Can't remove 서버아이피_2.old updating log file
2013-08-17 11:29:59, Rateup WARNING: /usr/bin/rateup Can't rename 서버아이피_2.log to 서버아이피_2.old updating log file
-------------------------------------------------------------------------------------------
 처음 실행하면 에러 비슷한 메시지가 출력이 된다. 두~세번째부터는 메시지는 사라짐.


cron에 등록
-------------------------------------------------------------------------------------------
# crontab -e
*/10 * * * * root LANG=C LC_ALL=C /usr/bin/mrtg /home/ifull/public_html/mrtg2/cfg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok
저장 완료
-------------------------------------------------------------------------------------------

 

홈페이지에서 확인
httpd://도메인/mrtg2/index.htm

 

이미지가 출력이 안되는 경우에는
# cp /var/www/mrtg/*.* /home/ifull/public_html/mrtg2/
복사하면 이미지 출력이 이상없이 정의됨.

 

이상입니다.


출처 : http://ifull.co.kr/xe/b_linux/206221

TAG •
?

  1. No Image 20Oct
    by JAESOO
    2016/10/20 by JAESOO
    Views 602 

    리눅스(Linux) 디렉토리 구조

  2. No Image 26Aug
    by JAESOO
    2016/08/26 by JAESOO
    Views 709 

    ssh서버가 비밀번호를 거부했습니다. 다시 시도하십시오.

  3. No Image 26Aug
    by JAESOO
    2016/08/26 by JAESOO
    Views 717 

    [리눅스] IP 설정 변경 하기

  4. No Image 13Jul
    by JAESOO
    2016/07/13 by JAESOO
    Views 675 

    리눅스 설치후 초기설정해야 할 것들 [2]

  5. No Image 13Jul
    by JAESOO
    2016/07/13 by JAESOO
    Views 702 

    리눅스 설치후 초기설정해야 할 것들 [1]

  6. No Image 12May
    by JAESOO
    2016/05/12 by JAESOO
    Views 540 

    쉘 프로그래밍을 이용한 시스템 관리 기법

  7. No Image 12May
    by JAESOO
    2016/05/12 by JAESOO
    Views 554 

    AIX 자주 쓰이는 관리 명령 모음

  8. No Image 12May
    by JAESOO
    2016/05/12 by JAESOO
    Views 604 

    AIX 시스템상의 core, SMT(Simultaneous Multi Threading) 수 확인하기

  9. No Image 11May
    by JAESOO
    2016/05/11 by JAESOO
    Views 439 

    리눅스 호스트명 변경

  10. No Image 11May
    by JAESOO
    2016/05/11 by JAESOO
    Views 560 

    AIX 서버 기초

  11. No Image 11May
    by JAESOO
    2016/05/11 by JAESOO
    Views 547 

    AIX Admin Study 교육 자료

  12. No Image 05May
    by JAESOO
    2016/05/05 by JAESOO
    Views 489 

    성능 엔지니어링 대한 접근 방법 (Performance tuning)

  13. No Image 04May
    by JAESOO
    2016/05/04 by JAESOO
    Views 552 

    [AIX] 파일시스템 관리 (du, df)

  14. No Image 04May
    by JAESOO
    2016/05/04 by JAESOO
    Views 504 

    IBM AIX Admin (사용자 DISK 관리)

  15. No Image 04May
    by JAESOO
    2016/05/04 by JAESOO
    Views 455 

    [UNIX] 유닉스 기본명령어

  16. No Image 04May
    by JAESOO
    2016/05/04 by JAESOO
    Views 558 

    [AIX] 파일시스템 용량 늘리기

  17. No Image 04May
    by JAESOO
    2016/05/04 by JAESOO
    Views 446 

    유닉스 상에서 ls 출력물을 MB 단위로 출력해주는 옵션

  18. No Image 02May
    by JAESOO
    2016/05/02 by JAESOO
    Views 438 

    ls 명령시 날짜 전체가 보이도록 하기

  19. No Image 31Mar
    by JAESOO
    2016/03/31 by JAESOO
    Views 663 

    리눅스 logrotate 에서 로그파일 강제로 rotate 시키기

  20. No Image 19Mar
    by JAESOO
    2016/03/19 by JAESOO
    Views 733 

    리눅스 시간 맞추기 : Time Server와 Sync (rdate, date)

Board Pagination Prev 1 2 3 4 5 6 7 8 9 Next
/ 9

PageViews   Today : 8010 Yesterday : 5037 Total : 21964062  /  Counter Status   Today : 7728 Yesterday : 4602 Total : 1190451

Edited by JAESOO

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


이 PC에는 나눔글꼴이 설치되어 있지 않습니다.

이 사이트를 나눔글꼴로 보기 위해서는
나눔글꼴을 설치해야 합니다.

설치 취소