IT/OracleLinux-1Z0460

[centos] MRTG 설정

알콩달콩아빠 2022. 4. 12. 10:12
728x90
반응형

 

MRTG - Multi Router Traffic Grapher

 

- UDP 161 port로 mrtg 작동

- TCP 80 port http 작동

 

- 필수 설치 : MRTG, MRTG_scrupt, Perl

- 필수 설정 : snmp, httpd

 

MRTG 다운로드 링크 (윈도우-zip, 리눅스-tar 설치)

: https://oss.oetiker.ch/mrtg/download.en.html

 

MRTG_script 다운로드 (압축푼 파일들을 MRTG푼 폴더 밑에 /bin에 넣어주세요)

: https://jnstory.net/8

 

Active Perl 다운로드 링크 (이외에 다른 Perl도 있음) - 로그인해야됨

: https://www.activestate.com/products/perl/downloads/

 

* Perl은 리눅스의 경우 대체로 탑재되어 있어 따로 설치가 필요 없지만 윈도우의 경우 설치해야됨.

 

1. yum -y install net-snmp net-snmp-utils mrtg httpd

 

2. SNMP 설정하기

 

/etc/snmp/snmpd.conf에 아래 사진과 같이 맨 아래에 추가로 입력

 

wq 저장하고 나와서

 

chkconfig snmpd on

 

service snmpd restart

 

*** SNMP 구성 및 연결 확인 명령어 ***

 

snmpwalk -v 1 -c solutions@ localhost IP-MIB::ipAdEntIfIndex

snmpwalk -v 1 -c solutions@ 127.0.0.1 IP-MIB::ipAdEntIfIndex

snmpwalk -v 1 -c solutions@ 192.168.10.133 [설정한 IP] IP-MIB::ipAdEntIfIndex

 

3. 관련 설정 파일을 생성해줍니다.

 

cfgmaker --global 'WorkDir:/var/www/mrtg' --output /etc/mrtg/mrtg.cfg solutions@@localhost

 

indexmaker --output=/var/www/mrtg/index.html /etc/mrtg/mrtg.cfg

 

service mrtg restart

 

4. vi /etc/httpd/conf.d/mrtg.conf 설정파일에서 하기 사진과 같이 설정 후 httpd 재시작

 

 
사진 삭제

사진 설명을 입력하세요.

ervice httpd restart

 

5. 스케쥴링 설정하기

 

crontab -e

*/1 * * * * env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg

 

service crond restart

 

*** http://192.168.10.133[설정한 IP]/mrtg 로 들어가면 그래프확인 가능! ***

 

 

*** http Port 변경 설정파일

 

/etc/httpd/conf/httpd.conf 에서 LISTEN 80 라인에서 수정하면 됩니다.

 

 
사진 삭제

사진 설명을 입력하세요.

=>> 수정 후 웹으로 들어 갈때 192.168.10.133:[변경한 포트번호]/mrtg

 

 

 

728x90
반응형

'IT > OracleLinux-1Z0460' 카테고리의 다른 글

리눅스에서 무선랜 사용하기  (0) 2022.04.25
Private Public 주소구조  (0) 2022.04.25
리눅스 네트워크  (0) 2018.02.21
Oracle Linux 7 version 방화벽 해제 방  (0) 2018.01.16
오라클리눅스 합격 사진  (0) 2018.01.11