The zabbix_agentd.conf template populates the 'Server' and 'ServerActive' values by joining the list of attribute values found in node['zabbix'].['agent'].['servers'] and node['zabbix'].['agent'].['servers_active'] respectively. Currently these values are not set anywhere unless the deployer has set them manually.
I think a great addition to the agent recipe would be to search for the Zabbix servers using the zabbix::server recipe (or an attribute, as is the more recent trend) in order to automatically populate these attributes if they haven't been assigned any other way.
In the special case of the agent being deployed on the Zabbix server, this should be detected and the additional address of 127.0.0.1 should be included in the list.
The zabbix_agentd.conf template populates the 'Server' and 'ServerActive' values by joining the list of attribute values found in
node['zabbix'].['agent'].['servers']
andnode['zabbix'].['agent'].['servers_active']
respectively. Currently these values are not set anywhere unless the deployer has set them manually.I think a great addition to the agent recipe would be to search for the Zabbix servers using the
zabbix::server
recipe (or an attribute, as is the more recent trend) in order to automatically populate these attributes if they haven't been assigned any other way.In the special case of the agent being deployed on the Zabbix server, this should be detected and the additional address of 127.0.0.1 should be included in the list.