Steps to reproduce:
- Install Zabbix agent from official Zabbix debian repository
- Open /etc/zabbix/zabbix_agentd.conf
Result:
Config variable Hostname is set "Zabbix server"
Expected:
Config variable Hostname should be unset
Rationale:
For the agent configuration if variable "Hostname" is unset it will take the value of the "hostname" command. For hosts which are being monitored by a Zabbix server instance this is the appropriate value. Otherwise, since we cannot unset it in a local config file under /etc/zabbix/zabbix_agentd.d, since we cannot have a line with "Hostname=" (it will prevent zabbix agent daemon to start), we have to manually override it.
This also prevents future upgrades to cleanly override the default configuration file, since it will always detect modification and create a /etc/zabbix/zabbix_agentd.conf.dpkg-dist instead.
Therefore, kindly change the default configuration file to have Hostname variable unset, to allow the agent to revert to the default value of "hostname".