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

Details

    • Team B
    • Sprint 92 (Sep 2022)
    • 1

    Description

      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.

      Attachments

        Activity

          People

            MVekslers Michael Veksler
            markfree MArk
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: