Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-21560

Zabbix Agent for Windows uses a different default configuration file

XMLWordPrintable

    • Sprint 92 (Sep 2022), Sprint 93 (Oct 2022), Sprint 94 (Nov 2022), Sprint 95 (Dec 2022), Sprint 96 (Jan 2023), Sprint 97 (Feb 2023), Sprint 98 (Mar 2023), Sprint 99 (Apr 2023), Sprint 100 (May 2023), Sprint 101 (Jun 2023), Sprint 102 (Jul 2023), Sprint 103 (Aug 2023), Sprint 104 (Sep 2023), Sprint 105 (Oct 2023), Sprint 106 (Nov 2023), Sprint 107 (Dec 2023), Sprint candidates, S2401
    • 1

      When trying to install a single instance of Zabbix Agent in Windows 10/11 using the provided Zip archive, I'm facing an odd behavior.

      I've downloaded the Zip archive and followed the installation instructions.
      The downloaded archive comes with the following structure.

      zabbix_agent2-6.2.2-windows-amd64-openssl-static.zip:bin\zabbix_agent2.exe
      zabbix_agent2-6.2.2-windows-amd64-openssl-static.zip:conf\zabbix_agent2.d\
      zabbix_agent2-6.2.2-windows-amd64-openssl-static.zip:conf\zabbix_agent2.conf
      zabbix_agent2-6.2.2-windows-amd64-openssl-static.zip:conf\zabbix_agent2.d\plugins.d\ceph.conf
      zabbix_agent2-6.2.2-windows-amd64-openssl-static.zip:conf\zabbix_agent2.d\plugins.d\docker.conf
      zabbix_agent2-6.2.2-windows-amd64-openssl-static.zip:conf\zabbix_agent2.d\plugins.d\memcached.conf
      zabbix_agent2-6.2.2-windows-amd64-openssl-static.zip:conf\zabbix_agent2.d\plugins.d\modbus.conf
      zabbix_agent2-6.2.2-windows-amd64-openssl-static.zip:conf\zabbix_agent2.d\plugins.d\mqtt.conf
      zabbix_agent2-6.2.2-windows-amd64-openssl-static.zip:conf\zabbix_agent2.d\plugins.d\mysql.conf
      zabbix_agent2-6.2.2-windows-amd64-openssl-static.zip:conf\zabbix_agent2.d\plugins.d\oracle.conf
      zabbix_agent2-6.2.2-windows-amd64-openssl-static.zip:conf\zabbix_agent2.d\plugins.d\postgres.conf
      zabbix_agent2-6.2.2-windows-amd64-openssl-static.zip:conf\zabbix_agent2.d\plugins.d\redis.conf
      zabbix_agent2-6.2.2-windows-amd64-openssl-static.zip:conf\zabbix_agent2.d\plugins.d\smart.conf

      From the documentation, "to install a single instance of Zabbix Agent with the default configuration file", I need to input the following command.

      zabbix_agent2.exe --install

      After trying this, I get the following error.

      PS C:\zabbix\bin> .\zabbix_agent2.exe --install
      zabbix_agent2 [8212]: ERROR: cannot open configuration file: open C:\zabbix\bin\zabbix_agent2.win.conf: O sistema não pode encontrar o arquivo especificado.

      The same error happens if I try the "--start", "--stop" or "--uninstall" parameters.

      I can only install or manipulate the Agent if I explicitly tell where the configuration file is (using "--config" parameter), or by copying the conf file to the same directory where the binary is and renaming it with the "win.conf" suffix.

      In my example, Zabbix Agent 2 binary is looking for a "C:\zabbix\bin\zabbix_agent2.win.conf" configuration file that does not exist.
      As seen from the Agent2 archive above, the default configuration file would be "C:\zabbix\conf\zabbix_agent2.conf".

      First, the package does not provide a "win.conf" suffix for the configuration file name.
      Second, the file is placed inside a "conf" directory, not the same as the binary itself.

      As I understand it, the Agent's binary is looking for a configuration file in the same directory, but the original archive comes with a different structure.
      Maybe it should look for a "..\conf\zabbix_agent2.conf" file instead.

      Therefore, I believe that the provided archive file for the Zabbix Agent is packed with a different organization than what the Agent binary is expecting; or, the binary is pointing to a wrong configuration file by default.

            mprihodko Mihails Prihodko
            markfree MArk
            Team B
            Votes:
            1 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: