기본 콘텐츠로 건너뛰기

gsjava Zabbix centos 7.x 설치

한글 매뉴얼 
http://manual.oplab.co.kr/doku.php/manual/web_monitoring/example

소스 버전 설치
https://idchowto.com/?p=40247

zabbix 란
서버나 네트워크 등을 포함한 클라이언트의 서비스들을 실시간으로 체크하여 모니터링 하는 관리 솔루션 소프트웨어입니다. Zabbix 에이전트를 Unix, Linux,Windows 등에 설치하여 CPU, MEM, 용량, 특정 tcp포트, snmp기능, ODBC, ping, ssh, web, Os command, IPMI, 로그 파일 등을 포함한 많은 정보를 감시할 수 있으며, 수집한 데이터를 그래프로 그려 편리하게 모니터링 가능합니다.

또한 모니터링 중 장애가 발생 하면 설정 해놓은 대로 메일 송신 , 특정 스크립트 실행, SMS 송신, jabber 메세지 발송등 기능을 사용 할수 있어, 장애 대비 모니터링 으로 사용하기 좋은 소프트웨어입니다.

설치버전 검색
https://www.zabbix.com/download?zabbix=4.2&os_distribution=centos&os_version=7&db=mysql

웹 UI를 위해서 httpd를 설치 한다. (80port)
# yum install httpd -y

RPM 버전으로 설치
a. Install Zabbix repository

# rpm -Uvh https://repo.zabbix.com/zabbix/4.2/rhel/7/x86_64/zabbix-release-4.2-2.el7.noarch.rpm
# yum clean all

서버와 클라이언트를 동시에 설치
b. Install Zabbix server, frontend, agent
# yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-agent

mysql 또는 MariaDB 를 사용해서 설치 한다.
DB는 이미 설치가 되어 있는것을 전제로 한다.
c. Create initial database

# mysql -uroot -p
password
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';
mysql> quit;
Import initial schema and data. You will be prompted to enter your newly created password.

# zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix

설정파일에서 DB에 설정한 패스워드를 넣는다.나는 zabbix를 입력
d. Configure the database for Zabbix server
Edit file /etc/zabbix/zabbix_server.conf

DBPassword=password

PHP로 웹 UI를 실행 시키는데 시간 설정이 필요하다.
e. Configure PHP for Zabbix frontend
Edit file /etc/httpd/conf.d/zabbix.conf, uncomment and set the right timezone for you.
# php_value date.timezone Asia/Seoul

설정이 변경되었으니 httpd를 다시 실행 시킨다.
f. Start Zabbix server and agent processes
Start Zabbix server and agent processes and make it start at system boot:

# systemctl restart zabbix-server zabbix-agent httpd
# systemctl enable zabbix-server zabbix-agent httpd

댓글

이 블로그의 인기 게시물

[Java] Http File Download 이어받기

Http 서버로부터 다운로드 받는 파일을 이어받기 위해서는 Http Header에 아래 두가지 정보를 추가해 주면 된다. URLConnection conn = url.openConnection(); conn.setRequestProperty("Accept-Ranges", "bytes"); conn.setRequestProperty("Range", "bytes=" + mOffset + "-"); 그러면 서버에서는 해당 Offset으로부터 File을 다운로드 시켜준다. 클라이언트가 요청헤더에 Range 필드를 포함 시켜서 보내면, 서버는 그 정보를 가지고 어디서 부터 파일을 보낼지 판단을 합니다. 하지만 클라이언트가(브라우저) Range 필드를 포함 시켜야 할지를 판단하는 기준은 최초 다운로드 요청시 서버의 응답헤더에 따라 다음 요청헤더에 Range 헤더를 생성할지 않할지 판단하게 됩니다. 그걸 당락짓는 응답 헤더 필드는 다음과 같습니다. Accept-Ranges , ETag, Last-Modified 반드시 위 필드를 응답 헤더에 같이 보내줘야 클라이언트는 다음 요청시 Range헤더를 포함시켜 보내게 됩니다. 참고로 말씀 드리면 위 필드를 포함 시켜서 보내더라도 value는 반드시 " " 로 묶어서 보내야 합니다. 안그러면 브라우저는 죽어도 Range 필드를 생성시키지 않습니다. HTTP 1.1 스펙은 따옴표를 강제적으로 해줘라 이런 내용 없습니다. 자바기준 40byte의 파일이라치면 클리이언트 요청을 두번으로 나누었다치면 이케 connection.setRequestProperty("Range", "bytes=0-20"); connection.setRequestProperty("Range", "bytes=20-40"); 단 co...

java 특정 디렉토리에 있는 파일 목록을 읽어내기, 정렬해서 가져오기

폴더 리스트 가져오기 String path="C:\"; File dirFile=new File(path); File []fileList=dirFile.listFiles(); for(File tempFile : fileList) {   if(tempFile.isFile()) {     String tempPath=tempFile.getParent();     String tempFileName=tempFile.getName();     System.out.println("Path="+tempPath);     System.out.println("FileName="+tempFileName);     /*** Do something withd tempPath and temp FileName ^^; ***/   } } 정렬해서 가져오기 import java.io.FileFilter; import java.io.IOException; import java.util.Arrays; import java.util.Date; import org.apache.commons.io.comparator.LastModifiedFileComparator; import org.apache.commons.io.filefilter.FileFileFilter; public class LastModifiedFileComparatorTest { public static void main(String[] args) throws IOException { File directory = new File("."); // get just files, not directories File[] files = directory.listFiles((FileFilter) FileFileFilter.FILE); System.out.println("Defaul...