设计原则:
1. zabbix_server设置不同的host groups
2. 用host groups区分不同的模块
3. zabbix_agentd携带模块信息在HostMetadata中
4. zabbix_agentd启动之后,自动注册到zabbix_server中
5. zabbix_server根据不同zabbix_agentd携带的HostMetadata信息,将其加入到不同的host groups中。(zabbix_server Actions Setting)
# cat zabbix_agentd.conf
Server={{ zabbix_server_ip }}
ListenPort={{ zabbix_agentd_port }}
ListenIP={{ zabbix_agentd_ip }}
ServerActive={{ zabbix_server_ip }}:{{ zabbix_server_port }}
HostMetadata={{ host_tags }}
RefreshActiveChecks=120
# zabbix web console
1. configure -> actions
2. Event source: Auto Registration
3. Create action:
a. Conditions: Host Metadata like {{ host_tag }}
b. Operations: Add to host groups:
阅读(1165) | 评论(0) | 转发(0) |