Ad Widget

Collapse

Multiple Agent config files created : Zabbix Agent 4.0.11

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zabbixfk
    Senior Member
    • Jun 2013
    • 256

    #1

    Multiple Agent config files created : Zabbix Agent 4.0.11

    I am not sure , if this is only my issue or anyone else facing too.
    I installed zabbix from epel repo, and as usual i was editing file /etc/zabbix/zabbix_agentd.conf, however changes did not get effect, and i spend quite a long time trying to figure what's happening - only to come to know this zabbix agent installations also created another file called /etc/zabbix_agentd.conf and its taking configs from there. I had to delete this file to come to know what's happening on the logs.
    Perhaps all the places i found /etc/zabbix/zabbix_agentd.conf as de facto path for agent configs, why would someone generate another /etc/zabbix_agentd.conf ?

    Dear zabbix team, can you explain this?

    Code:
    [root@linux ~]# service zabbix-agent status
    
    Redirecting to /bin/systemctl status zabbix-agent.service
    
    ● zabbix-agent.service - Zabbix Monitor Agent
    
       Loaded: loaded (/usr/lib/systemd/system/zabbix-agent.service; disabled; vendor preset: disabled)
       Active: failed (Result: exit-code) since Sun 2019-09-22 21:39:38 IST; 15s ago
      Process: 30953 ExecStart=/usr/sbin/zabbix_agentd -f (code=exited, status=1/FAILURE)
     Main PID: 30953 (code=exited, status=1/FAILURE)
    
    Sep 22 21:39:38 linux systemd[1]: Started Zabbix Monitor Agent.
    
    Sep 22 21:39:38 linux zabbix_agentd[30953]: zabbix_agentd [30953]: cannot open config file "/etc/zabbix_agentd.conf": [2] No such file or directory
    
    Sep 22 21:39:38 linux systemd[1]: zabbix-agent.service: main process exited, code=exited, status=1/FAILURE
    
    Sep 22 21:39:38 linux systemd[1]: Unit zabbix-agent.service entered failed state.
    
    Sep 22 21:39:38 linux systemd[1]: zabbix-agent.service failed.
    Code:
    [root@linux ~]# locate zabbix_agentd.conf
    /etc/zabbix_agentd.conf
    /etc/zabbix/zabbix_agentd.conf
    [root@linux ~]#
    Code:
    [root@linux ~]# 
    [root@linux ~]# zabbix_agentd -V
    zabbix_agentd (daemon) (Zabbix) 4.0.11
    Revision 53bb6bc0f0 29 July 2019, compilation time: Aug 11 2019 08:38:15
    
    Copyright (C) 2019 Zabbix SIA
    License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>.
    This is free software: you are free to change and redistribute it according to
    the license. There is NO WARRANTY, to the extent permitted by law.
    
    This product includes software developed by the OpenSSL Project
    for use in the OpenSSL Toolkit (http://www.openssl.org/).
    
    Compiled with OpenSSL 1.0.2k-fips  26 Jan 2017
    Running with OpenSSL 1.0.2k-fips  26 Jan 2017
    [root@linux ~]#
    Code:
    [root@linux ~]# 
    [root@linux~]# rpm -qa | grep zabbix
    
    zabbix40-agent-4.0.11-1.el7.x86_64
    
    zabbix40-4.0.11-1.el7.x86_64
    
    [root@linux~]#
    [root@linux~]#
    Code:
    [root@linux ~]# yum info zabbix40-agent
    
    Installed Packages
    Name        : zabbix40-agent
    Arch        : x86_64
    Version     : 4.0.11
    Release     : 1.el7
    Size        : 467 k
    Repo        : installed
    From repo   : epel
    
    Summary     : Zabbix agent
    URL         : http://www.zabbix.com
    License     : GPLv2+
    Description : Zabbix agent, to be installed on monitored systems
    
    [root@linux ~]#
  • dimir
    Zabbix developer
    • Apr 2011
    • 1080

    #2
    There are 2 Zabbix package repositories:

    - official CentOS packages (where agent probably uses /etc/zabbix_agentd.conf)
    - official Zabbix packages (where agent uses /etc/zabbix/zabbix_agentd.conf)

    The latter are provided by Zabbix itself and are located Zabbix repo: https://repo.zabbix.com

    Another possibility, if you compile Zabbix from sources the agent config will be also /etc/zabbix/zabbix_agentd.conf by default.

    Comment

    • zabbixfk
      Senior Member
      • Jun 2013
      • 256

      #3
      Ok thanks for the clarification.
      You should add this info in all the manuals available out there.
      Other thing is EPEL created both files ( /etc/zabbix_agentd.conf and /etc/zabbix/zabbix_agentd.conf both)
      For now, since i used EPEL repo, i deleted /etc/zabbix_agentd.conf and created symbolic link to /etc/zabbix/zabbix_agentd.conf.
      Also, please add a way to figureout from the agent - which config file is being read during the run.

      Comment

      • dimir
        Zabbix developer
        • Apr 2011
        • 1080

        #4
        The latter is there since 2.2


        Comment

        • zabbixfk
          Senior Member
          • Jun 2013
          • 256

          #5
          Ah, may be i was looking at wrong google search pattern. Anyways - thanks for the pointers to documentation - these seems to be hidden inside what's new section : what i am proposing is to add this line in agent installation section of the main page. Somehwre here
          Last edited by zabbixfk; 24-09-2019, 09:43. Reason: added install path url

          Comment

          Working...