Linux & Bash 리눅스 서버 모니터링 - 모니터릭스 https://www.monitorix.org/
2019.03.12 11:06
리눅스 서버 모니터링 - 모니터릭스 https://www.monitorix.org/
레드헷 계열 : EPEL (Extra Packages for Enterprise Linux) 에서 설치할때에는 아래와 같습니다.
yum install -y htop iotop iptraf vmstat strace wget cpan
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install --enablerepo=epel -y rrdtool rrdtool-perl perl-libwww-perl perl-MailTools perl-MIME-Lite perl-CGI perl-DBI
yum install --enablerepo=epel -y perl-XML-Simple perl-Config-General perl-HTTP-Server-Simple perl-IO-Socket-SSL
cd /usr/local/src
wget http://www.monitorix.org/monitorix-3.10.1-1.noarch.rpm
rpm -ivh monitorix-3.10.1-1.noarch.rpm
chkconfig --level 35 monitorix on
/etc/monitorix/monitorix.conf 파일에서 모니터릭스 포트 (웹 브라우저로 접근하는 포트) 수정.
<httpd_builtin>
...
port = 3080
모니터링 하고자 하는 포트를 추가합니다.
# PORT graph
# -----------------------------------------------------------------------------
<port>
max = 9
rule = 24000
list = 25, 80, 22, 5666, 443, 139, 161, 3080
<desc>
25 = SMTP, tcp, in, 0, 1000, L
80 = HTTP, tcp, in, 0, 1000, L
22 = SSH, tcp, in, 0, 1000, L
5666 = Nrpe, tcp, in, 0, 1000, L
443 = HTTPS, tcp, in, 0, 1000, L
139 = Samba, tcp, in, 0, 1000, L
161 = SNMP, udp, in, 0, 1000, L
3080 = Monitorix, tcp, in, 0, 1000, L
</desc>
graphs_per_row = 3
</port>
웹브라우저로 모니터링 그래프에 접근할때 아이디/비번 팝업 설정.
cd /var/lib/monitorix/
아파치 htpasswd 파일 생성.
mysql 이 있다면 사용하도록 수정.
<graph_enable>
...
mysql = y
mysql 디비 계정정보 수정.
# MYSQL graph
# -----------------------------------------------------------------------------
<mysql>
conn_type = host
list = localhost
# list = /var/lib/mysql/mysql.sock
<desc>
localhost = 3306, DB-ID, DB-PW
</desc>
mysql 디비에 모니터릭스 계정정보 추가. (권한은 usage)
mysql> GRANT USAGE ON *.* TO 'DB-ID'@'localhost' IDENTIFIED BY 'DB-PW';
서비스 시작.
service monitorix start
----------------------
우분투 계열
apt-get update
apt-get install rrdtool perl libwww-perl libmailtools-perl libmime-lite-perl librrds-perl libdbi-perl
apt-get install libxml-simple-perl libhttp-server-simple-perl libconfig-general-perl libio-socket-ssl-perl
wget http://www.monitorix.org/monitorix_3.10.1-izzy1_all.deb
dpkg -i monitorix_3.10.1-izzy1_all.deb
이런저런 귀찮은 작업들이 한방에 끝납니다.
예전에는 엄청 어렵게 했는데 말이죠...
시스템 로드 그래프입니다.
네트워크 포트별 트래픽입니다.
MySQL 사용 쿼리 그래프입니다.
지금은 데이터가 없어서 안나오네요. 항목만 봐보세요.
댓글 0
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
45 | 배치 batch - 오래된 로그파일 정리하기 | MaraSong | 2019.01.29 | 1741 |
44 | apache + letsencrypt (무료 SSL 인증기관 인증서) 설치 및 설정 | MaraSong | 2019.01.31 | 1088 |
43 | CentOS + Nagios 센트OS 에서 나기오스 설치하기 | MaraSong | 2019.01.31 | 1058 |
42 | Bash - 자주 쓰는 함수 | MaraSong | 2019.02.01 | 800 |
41 | 라즈베리파이 - OS 설치후 확인해야 하는 사항 | MaraSong | 2019.02.04 | 667 |
40 | @MaraOCRbot 이미지에서 텍스트를 추출하고 한국어로 번역해주는 텔레그램 봇 소개 | MaraSong | 2019.02.04 | 1150 |
39 | SpeedTest - 인터넷 속도 측정 사이트. 网速检查。インターネット速度測定. | MaraSong | 2019.02.05 | 4955 |
38 | 노스맵 - 실시간으로 인터넷 공격상황을 보여주는 사이트 | MaraSong | 2019.02.06 | 566 |
37 | iptables - 커넥션 갯수로 특정 아이피 차단하기 | MaraSong | 2019.02.12 | 1088 |
36 | 인터넷 불법 정보, 과연 차단할 수 있을까 - KT 음란물 차단을 바라보며. | MaraSong | 2019.02.13 | 847 |
* 쿠팡 파트너스 활동을 통해 일정액의 수수료를 제공받을 수 있습니다.