zarplata / zabbix-agent-extension-elasticsearch

Zabbix agent extension for monitoring Elasticsearch
35 stars 29 forks source link

Feature set zabbix hostname as a macro #16

Closed adrienne-cln closed 5 years ago

adrienne-cln commented 5 years ago

Hi,

The current implementation of the « hostname » argument required by the program to send data to the zabbix server is a little bit poor. Indeed, there is no mechanism to dynamically set it by reading the _zabbixagentd.conf file on the server as described in the official documentation.

Expl on my system:

$ grep Hostname= /etc/zabbix/zabbix_agentd.conf
Hostname=my_hostname

I propose to set it with the use of a zabbix macro directly on the zabbix host. As the current default value of the « hostname » argument is « None », this PR doesn't change much to the usage.

If in the future, the dynamic reading of this parameter is implemented, the changes of this PR could be discarded.