Ad Widget

Collapse

default Hostname in zabbix-agentd.conf

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • LukaszP
    Junior Member
    • Jun 2023
    • 1

    #1

    default Hostname in zabbix-agentd.conf

    Hello everyone.

    Today I stumbled upon weird configuration issue on a newly installed Agent 6.0.x from Your RHEL8 repository.

    One of the defaults is
    Hostname=zabbix server
    line, which confused the server with other host named "zabbix server" in the past. It resulted in a lot of false positives.

    I suggest to comment out that line by default:
    #Hostname=
    so the Agent will inherit hostname from operating system. I realize that this often will be "localhost.localdomain" and replicate the problem anyway, but at least it will be entirely my fault.

    thanks
  • Robert09
    Junior Member
    • Jul 2023
    • 1

    #2
    Hii,
    I appreciate your feedback and suggestion. However, I think that commenting out the hostname line might not be the best solution, as it could lead to other issues such as duplicate or invalid hostnames. A better option might be to use the HostnameItem parameter, which allows you to specify a system command or a key to retrieve the hostname dynamically like :

    HostnameItem=system.hostname

    Comment

    • Steven09
      Junior Member
      • Jul 2023
      • 4

      #3
      Yes, You are right.
      You have to Restart the Zabbix Agent to apply the new configuration:
      sudo systemctl restart zabbix-agent

      Comment

      Working...