Ad Widget

Collapse

comment Hostname from agent configuration or make it overwritable by HostnamItem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • derdanielder
    Junior Member
    • Feb 2025
    • 1

    #1

    comment Hostname from agent configuration or make it overwritable by HostnamItem

    Hello,

    we run Zabbix Agent2 on multiple Ubuntu servers and use the "HostnameItem" parameter in the agent configuration (instead of "Hostname") so that a single configuration file can be applied to all machines. However, when attempting to use autoupgrade for the Zabbix Agent2, the upgrade process fails due to a configuration file prompt—the customized config file is blacklisted.

    To work around this issue, I moved all my custom settings to a separate file at /etc/zabbix/zabbix_agent2.d/x.conf and restored the original agent configuration file. Unfortunately, because the original file still contains the "Hostname" parameter set to "Zabbix Server", the "HostnameItem" setting in my custom file is ignored.

    It would be really helpful if this behavior could be addressed in a future release.
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    FIx your upgrade process... Old topic, but I am pretty sure it work for newer versions also..
    https://serverfault.com/questions/52...e-in-ubuntu-12

    Comment

    • troffasky
      Senior Member
      • Jul 2008
      • 567

      #3
      Originally posted by Donkey
      Can't you just use sed to do a find and replace in the conf file? Or am I missing something here?
      Something would need to kick off that sed process every time an update happened to the Zabbix agent.
      IMO the "Hostname" value should not be statically set in the official packages, so that the hostname can just be the actual hostname.

      Comment

      Working...