설치 환경
- OS - Ubuntu 24.04.1 LTS
- Zabbix - Zabbix 7.0.6
Zabbix 사이트에서 사용하는 OS, Zabbix 버전 등 환경에 따라 선택
Download and install Zabbix
Talk to experts Benefit from expert advice and best practices for all Zabbix-related matters Get technical advice Get instant access to a team of Zabbix experts for guaranteed professional support 24x7 Obtain knowledge Focused, comprehensive training for a
www.zabbix.com
1. 레포지토리 추가
# dpkg -i zabbix-release_latest_7.0+ubuntu24.04_all.deb
# apt update
2. Zabbix agent 2 설치
# apt install zabbix-agent2 zabbix-agent2-plugin-*
3. Zabbix 설정
# vi /etc/zabbix/zabbix_agent2.conf
Server=192.168.100.101
ServerActive=192.168.100.101
Hostname=zdb
- Server - Zabbix 서버 또는 Proxy IP (수동 모니터링)
- Zabbix 서버나 프록시가 에이전트에 연결하여 데이터를 요청할 수 있는 IP 주소 목록을 정의
- 에이전트는 이 IP 주소들로부터의 연결만 수락
- TCP 포트 10050을 통해 통신
- Server는 인바운드 연결을 제어
- ServerActive - Zabbix 서버 또는 Proxy IP (능동 모니터링)
- 에이전트가 능동적으로 연결하여 데이터를 보낼 Zabbix 서버나 프록시의 IP 주소 목록을 정의
- 에이전트는 이 주소들로 연결하여 모니터링 항목 목록을 요청하고 데이터를 전송
- TCP 포트 10051을 통해 통신
- ServerActive는 아웃바운드 연결을 정
- Hostname - 모니터링 대상 서버명
4. agent 서비스 재시작 및 enable
# systemctl restart zabbix-agent2.service
# systemctl enable zabbix-agent2.service
# systemctl status zabbix-agent2.service
● zabbix-agent2.service - Zabbix Agent 2
Loaded: loaded (/usr/lib/systemd/system/zabbix-agent2.service; enabled; preset: enabled)
Active: active (running) since Mon 2025-01-06 22:58:43 KST; 31s ago
Main PID: 2734 (zabbix_agent2)
Tasks: 8 (limit: 9443)
Memory: 4.9M (peak: 9.3M)
CPU: 131ms
CGroup: /system.slice/zabbix-agent2.service
└─2734 /usr/sbin/zabbix_agent2 -c /etc/zabbix/zabbix_agent2.conf
Jan 06 22:58:43 Virtual-Machine systemd[1]: Started zabbix-agent2.service - Zabbix Agent 2.
Jan 06 22:58:43 Virtual-Machine zabbix_agent2[2734]: Starting Zabbix Agent 2 (7.0.8)
Jan 06 22:58:43 Virtual-Machine zabbix_agent2[2734]: Zabbix Agent2 hostname: [Virtual-Machine]
Jan 06 22:58:43 Virtual-Machine zabbix_agent2[2734]: Press Ctrl+C to exit.
5. Zabbix 모니터링 등록(Host 추가)
- "Monitoring - Hosts" 클릭 후 우측 상단 "Create host" 선택
- Host name: 모니터링 대상 IP 또는 서버명
- Interfacces - Agent: 모니터링 대상 IP
등록 후 시간이 어느정도 지나 통신이 진행되면 Agent가 활성화 됨 (ZBX 녹색)