Ad Widget

Collapse

zabbix-agent2 package and default Hostname setting

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • throw1106a
    Junior Member
    • Nov 2020
    • 1

    #1

    zabbix-agent2 package and default Hostname setting

    Hello,

    I have just installed the "zabbix-agent2" package on Debian 9 (stretch) using the instructions at:

    * https://www.zabbix.com/download?zabb...tretch&db=&ws=

    After doing so, I found that in the default "/etc/zabbix/zabbix_agent2.conf" file, the "Hostname" variable was:

    * Hostname=Zabbix server

    This does not make any sense to me: the majority of systems out there will not be the Zabbix server, and so for 99.99% of systems it will be changed. I think having the agent config defined it is a bug.

    If there is a desire of the Zabbix server to be labeled, and to think of itself, as "Zabbix server" then perhaps the "zabbix-server-*" package(s) should drop a file in /etc/zabbix/zabbix_agent.d/ and /etc/zabbix/zabbix_agent2.d/ to explicitly do that. However let the clients use "system.hostname" value by default.

    Ideally it would be possible to just install the package and the system starts working: perhaps at most drop a file in zabbix_agent(2).d/ with a "Server" line in it.
  • radu-snappy
    Junior Member
    • Dec 2025
    • 1

    #2
    Hi, I'm from the future Replying now because I had the same question today, and Google showed me your post as the closest thing to an actual answer - and there was no answer.

    The hostname is set to "Zabbix Server" in the /etc/zabbix/zabbix_agent2.conf file:

    Code:
    Hostname=Zabbix server
    If you comment that out, or if you set it to an empty string in a .conf file in /etc/zabbix/zabbix_agent2.d/ (this will make dpkg not bother you about local changes on package upgrade), then
    Code:
    HostnameItem=system.hostname
    will take over.

    Comment

    Working...