리눅스 zabbix agent2 구성

2025. 1. 6. 23:12·모니터링(Zabbix,Grafana)

설치 환경

  • OS - Ubuntu 24.04.1 LTS
  • Zabbix - Zabbix 7.0.6

 

Zabbix 사이트에서 사용하는 OS, Zabbix 버전 등 환경에 따라 선택

  • https://www.zabbix.com/download
 

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. 레포지토리 추가

# wget https://repo.zabbix.com/zabbix/7.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_latest_7.0+ubuntu24.04_all.deb

# 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 녹색)

 

저작자표시 비영리 변경금지 (새창열림)
'모니터링(Zabbix,Grafana)' 카테고리의 다른 글
  • zabbix docker 모니터링 오류 (Cannot fetch data: Get http://1.28/system/df : dial unix /var/run/docker.sock: connect: permission denied.)
  • Zabbix를 통한 TCP/UDP 포트 상태 모니터링(UserParameter 사용)
  • Zabbix VM을 Docker 컨테이너로 이전(Grafana 포함)
  • Grafana 알람 메시지 Telegram으로 받기
기억보다는 기록을...
기억보다는 기록을...
내가 보려고 정리하는 글..
  • 기억보다는 기록을...
    메모장
    기억보다는 기록을...
    • 분류 전체보기
      • 클라우드(Azure, AWS, Alibaba)
      • 모니터링(Zabbix,Grafana)
      • 가상화(VMWare, Hyper-V)
      • Docker
      • Ansible
      • Linux
      • Windows
      • 이것저것
      • SQL
      • -------------------------
      • 재테크
  • 전체
    오늘
    어제
  • hELLO· Designed By정상우.v4.10.2
기억보다는 기록을...
리눅스 zabbix agent2 구성
상단으로

티스토리툴바