I need to create a trigger that will pop when a host is added to a host group. So far, I'm not getting very far. Any suggestions?
Ad Widget
Collapse
Trigger when host added to host group
Collapse
X
-
Tags: None
-
you mean when someone adding new server to zabbix GUI -
you can make a script via DB
you have 3 tables that contains all this info:
1. groups - youll need to collect groupid
2. hosts_groups - there you can see which host connected to which group
for exsample if i run this quary :
it will show me how mant host connected to hostgroup number 9Code:mysql -N -s -D zabbixdb -e "select * from hosts_groups where groupid = 9 " | wc -l
and then you can make a trigger for that
you'll identify group name using the table "groups "
hope i helped
Comment