ubuntu 16.04 + zabbix 3.4 + zabbix agent
os: ubuntu 16.04
zabbix: 3.4
ip 规划
192.168.56.101 node1 pgsql 9.6 master
192.168.56.102 node2 pgsql 9.6 slave
192.168.56.103 node3 zabbix proxy
192.168.56.104 node4 zabbix server
本篇blog介绍在 node1、node2 节点上安装 zabbix agent 的具体过程。
安装 zabbix_agent
# wget https://repo.zabbix.com/zabbix/3.4/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.4-1+xenial_all.deb
# dpkg -i zabbix-release_3.4-1+xenial_all.deb
# apt update
# apt install zabbix-agent
# ls -l /etc/zabbix/
修改配置文件
# vi /etc/zabbix/zabbix_agentd.conf
PidFile=/var/run/zabbix/zabbix_agentd.pid
LogFile=/var/log/zabbix/zabbix_agentd.log
LogFileSize=0
Server=192.168.56.103
ServerActive=192.168.56.103
Hostname=node1
AllowRoot=1
Include=/etc/zabbix/zabbix_agentd.d/*.conf
LoadModulePath=/usr/lib/zabbix/modules/
这里使用了 zabbix proxy,所以 Server、ServerActive均指向了zabbix proxy
启动 zabbix agent
# systemctl restart zabbix-agent
# systemctl enable zabbix-agent
或者使用
# update-rc.d zabbix-proxy defaults 90
# ps -ef|grep -i zabbix
zabbix 12380 1 0 10:32 ? 00:00:00 /usr/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf
zabbix 12381 12380 0 10:32 ? 00:00:00 /usr/sbin/zabbix_agentd: collector [idle 1 sec]
zabbix 12382 12380 0 10:32 ? 00:00:00 /usr/sbin/zabbix_agentd: listener #1 [waiting for connection]
zabbix 12383 12380 0 10:32 ? 00:00:00 /usr/sbin/zabbix_agentd: listener #2 [waiting for connection]
zabbix 12384 12380 0 10:32 ? 00:00:00 /usr/sbin/zabbix_agentd: listener #3 [waiting for connection]
zabbix 12385 12380 0 10:32 ? 00:00:00 /usr/sbin/zabbix_agentd: active checks #1 [idle 1 sec]
root 12448 1659 0 10:32 pts/0 00:00:00 grep --color=auto -i zabbix
参考:
https://www.zabbix.com/download
https://www.zabbix.com/documentation/3.4/manual
https://www.zabbix.com/documentation/3.4/manual/installation/install_from_packages