1. Zabbix 에이전트 설치
1 [root@host01 ~]# rpm -ivh http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm
2 [root@host02 ~]# yum install -y zabbix-agent
3 [root@host02 ~]# firewall-cmd --permanent --add-port=10050/tcp
4 [root@host02 ~]# firewall-cmd --permanent --add-port=10051/tcp
5 [root@host02 ~]# firewall-cmd --reload # Zabbix 포트 방화벽 설정 적용
2. Zabbix 설정 구성
2.1 에이전트 설정 파일 구성
1 [root@host02 ~]# vi /etc/zabbix/zabbix_agentd.conf
2 PidFile=/var/run/zabbix/zabbix_agentd.pid
3 LogFile=/var/log/zabbix/zabbix_agentd.log
4 LogFileSize=0
5 Server=192.168.1.1,192.168.10.50 # 수동 모드에서 연결 허용 서버 지정
6 ServerActive=192.168.10.50 # 자동 모드에서 데이터 전송 대상 서버
7 Hostname=host02 # 웹 인터페이스의 호스트명과 일치해야 함
8 Include=/etc/zabbix/zabbix_agentd.d/*.conf
2.2 서비스 시작 및 부팅 시 자동 실행 설정
1 [root@host02 ~]# systemctl start zabbix-agent.service
2 [root@host02 ~]# systemctl enable zabbix-agent.service
부록 1: Windows 시스템에 Zabbix 에이전트 설치
- 지정된 디렉토리 생성 후 압축 파일 내 conf/zabbix_agentd.win.conf를 해당 위치로 복사
예: C:\Program Files\zabbix_agent
- 압축 파일의 /bin/win32&win64 폴더에서 적절한 버전 파일을 새로 만든 디렉토리에 복사
- 서버 관리자 → 구성 → 서비스 → Zabbix 서비스를 자동 시작으로 설정
- 설치 디렉토리의 설정 파일 수정 \\zabbix-3.2\\conf\\zabbix_agentd.win.conf
1 LogFile=C:\Program Files\zabbix_agent\zabbix_agentd.log
2 Server=192.168.1.1,192.168.10.50 # 수동 모드에서 연결 허용 서버
3 ServerActive=192.168.10.50 # 자동 모드에서 데이터 전송 대상
4 Hostname=WIN10PC # 웹 인터페이스에 등록된 호스트명과 동일하게 설정
- 클라이언트 시작
시작 → 실행 → cmd
1 cd C:\Program Files\zabbix_agent
2 "zabbix_agentd.exe" -c "C:\Program Files\zabbix_agent\zabbix_agentd.win.conf" -i
3 "zabbix_agentd.exe" -c "C:\Program Files\zabbix_agent\zabbix_agentd.win.conf" -s
4 -c :설정 파일 경로 지정
5 -i :클라이언트 설치
6 -s :클라이언트 시작
7 -x :클라이언트 중지
8 -d :클라이언트 제거
- 방화벽에서 Zabbix 프로그램 허용
참고: 서비스 설치 후 관리 도구 → 서비스에서 Zabbix agent를 부팅 시 자동 시작으로 설정할 수 있습니다.
부록 2: SNMP 모니터링 구성
1 yum -y install net-snmp
2 vi /etc/snmpd/snmpd.conf
3 com2sec mynetwork 192.168.10.50 public_monitor
4 com2sec mynetwork 127.0.0.1 public
5 group MyROGroup v2c mynetwork
3. Zabbix 서버와 에이전트 간 연결 검증
3.1 수동 검증 절차
Zabbix-Get 명령어를 사용하여 Zabbix 서버에서 에이전트로의 데이터 수집 성공 여부 확인
1 [root@monitor01 ~]# yum -y install zabbix-get.x86_64
2 [root@monitor01 ~]# vi /etc/zabbix/zabbix_agentd.conf
3 PidFile=/var/run/zabbix/zabbix_agentd.pid
4 LogFile=/var/log/zabbix/zabbix_agentd.log
5 LogFileSize=0
6 Server=127.0.0.1,192.168.10.50 # 수동 모드에서 연결 허용 서버
7 ServerActive=192.168.10.50 # 자동 모드에서 데이터 전송 대상
8 #Zabbix-서버 자체도 모니터링 필요하므로 자신의 IP 주소 입력
9 Hostname=Zabbix server # 웹 인터페이스 설정과 일치해야 함
10 [root@monitor01 ~]# zabbix_get -s 192.168.10.50 -k system.uname # 자체 시스템 테스트
11 [root@monitor01 ~]# zabbix_get -s 192.168.10.51 -k system.uname # 다른 Linux 호스트 테스트
12 [root@monitor01 ~]# zabbix_get -s 192.168.10.52 -k system.uname # Windows 시스템 테스트
13 [root@monitor01 ~]# zabbix_get -s 192.168.10.50 -p 10050 -I 127.0.0.1 -k system.uname