zabbix-server6.0与zabbix-agent部署及配置
zabbix-server6.0与zabbix-agent部署及配置
环境:
1 | Static hostname: test |
| 环境 | ||
|---|---|---|
| 服务端 | 10.0.0.10 | ubuntu20.04 |
| 客户端 | 10.0.0.11 | ubuntu20.04 |
一、zabbix6.0服务端部署脚本
- 该脚本是幂等性的 可以重复执行 但需要注意 已经存在服务端的机器不可执行 否则会导致原有监控数据丢失💣
1 |
|
二、zabbix-agent二进制部署脚本
该脚本是幂等性的 可以重复执行 但需要注意 已经存在客户端的机器不可执行 否则会导致原有监控数据丢失💣
zabbix-agent端配置注意事项 主要三项
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17root@test:/tmp# grep -E "Server=10.0.0.10|Hostname|ServerActive" /usr/local/zabbix_agent/conf/zabbix_agentd.conf
Server=10.0.0.10 # 服务端IP
### Option: ServerActive
# ServerActive=127.0.0.1:10051
# ServerActive=127.0.0.1:20051,zabbix.domain,[::1]:30051,::1,[12fc::1]
# ServerActive=zabbix.cluster.node1;zabbix.cluster.node2:20051;zabbix.cluster.node3
# ServerActive=zabbix.cluster.node1;zabbix.cluster.node2:20051,zabbix.cluster2.node1;zabbix.cluster2.node2,zabbix.domain
# ServerActive=
ServerActive=10.0.0.10 # 服务端IP
### Option: Hostname
# Value is acquired from HostnameItem if undefined.
# Hostname=
Hostname=10.0.0.11 # 客户端IP
### Option: HostnameItem
# Item used for generating Hostname if it is undefined. Ignored if Hostname is defined.
# HostnameItem=system.hostname
# Aliases can be used in HostMetadataItem but not in HostnameItem parameters.
部署脚本如下:zabbix-agent.sh
1 |
|
三、zabbix-agent配置
- Configuration >Hostsgroup
- Configuration >Hosts
All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.
Comment





