반응형
AWS EC2에 Zabbix 모니터링 구성
[설치 환경]
- Infra : AWS
- Server : Amazon Linux 2 (Zabbix 수집 서버 및 DB 분리)
- DB : PostgrSQL 11
Zabbix 수집 서버 구성
- Zabbix 공식 사이트에서 시스템 환경에 맞는 플랫폼을 설치하면 설치 방법을 확인할 수 있습니다.
https://www.zabbix.com/download
Download and install Zabbix
www.zabbix.com
플랫폼에 맞게 Zabbix 설치 및 구성
a. Install Zabbix repository
rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
yum clean all
b. Install Zabbix server, frontend, agent
yum install zabbix-server-pgsql zabbix-agent
c. Install Zabbix frontend
Enable Red Hat Software Collections
yum-config-manager --enable rhel-server-rhscl-7-rpms
Edit file /etc/yum.repos.d/zabbix.repo and enable zabbix-frontend repository.
[zabbix-frontend]
...
enabled=1
...
Install Zabbix frontend packages.
yum install zabbix-web-pgsql-scl zabbix-apache-conf-scl
Zabbix DB 서버 구성
PostgreSQL 설치
sudo yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
sudo yum install -y postgresql11-server postgresql11-contrib
systemctl enable postgresql
systemctl start postgresql
ps -ef | grep postgre
netstat -an
su - postgres
psql
Zabbix 사용자 및 DB 생성
su - postgres
psql
create user zabbix password 'zabbixadmin' superuser;
create database zabbix owner zabbix;
On Zabbix server host import initial schema and data. You will be prompted to enter your newly created password.
zcat /usr/share/zabbix-sql-scripts/postgresql/server.sql.gz | sudo -u zabbix psql zabbix
Zabbix 기본 명령어
#zabbix server
systemctl start zabbix-server
systemctl stop zabbix-server
systemctl restart zabbix-server
systemctl status zabbix-server
#zabbix db
systemctl start postgresql
systemctl stop postgresql
systemctl restart postgresql
systemctl status postgresql
# zabbix web
systemctl start httpd
systemctl stop httpd
systemctl restart httpd
systemctl status httpd
# zabbix agent
systemctl start zabbix-agent
systemctl stop zabbix-agent
systemctl restart zabbix-agent
systemctl status zabbix-agent
반응형
'모니터링 > Zabbix' 카테고리의 다른 글
[Zabbix] Zabbix를 사용하는 이유 (0) | 2024.01.11 |
---|