I´m monitoring lot of servers, but once the VPN is down Zabbix causes multiple alarms for each hosts.
My solution was to create a calculated item, using foreach to get "0" if all the hosts in the hostgroup are down. In that case I would have one alert saying that connection to X group is down and not 200 alerts for each host like now.
I tried with these items, but not successfully:
count(last_foreach(/*/agent.ping?[group="HOSTGROUP-A"]))
nodata(last_foreach(/*/agent.ping?[group="HOSTGROUP-A"]))
I thought this would work, but if I stop the zabbix agent in all the hosts from this Hostgroup, it still returns X, instead of 0.
I think it just counts the agent.ping items assigned to each host, but not the real output from this item. Maybe because the agent.ping return 1 or "error" if no connection is done.
Also tried with "nodata", but seems to be not supported together with the _foreach
Tried with count/sum. Other operators give erros.
You should use trigger dependencies.
You can set dependancies by hand, or through a script that uses the trigger api