[ZBX-21560] Zabbix Agent for Windows uses a different default configuration file Created: 2022 Sep 03 Updated: 2024 Apr 10 Resolved: 2024 Feb 23 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Agent (G), Documentation (D) |
Affects Version/s: | 6.2.1, 6.2.2 |
Fix Version/s: | 7.0.0alpha5, 7.0 (plan) |
Type: | Problem report | Priority: | Trivial |
Reporter: | MArk | Assignee: | Mihails Prihodko |
Resolution: | Fixed | Votes: | 1 |
Labels: | agent, agent2, archive, configuration, file, package, windows, zip | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Windows 10 and 11 |
Team: | |
Sprint: | 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 |
Story Points: | 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. 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. First, the package does not provide a "win.conf" suffix for the configuration file name. 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. 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. |
Comments |
Comment by MArk [ 2022 Sep 03 ] | ||
Documentation quote: https://www.zabbix.com/documentation/current/en/manual/appendix/install/windows_agent
| ||
Comment by dimir [ 2022 Sep 13 ] | ||
markfree correct me if I'm wrong. Looks like there are 2 issues:
| ||
Comment by MArk [ 2022 Sep 21 ] | ||
@dimir I think you put it in an easier way. That's it. | ||
Comment by Mihails Prihodko [ 2023 Jun 07 ] | ||
Mini spec v1.0 Both Zabbix agent 1 and 2 on Windows should behave consistently in the following aspects.
What's affected:
Zabbix agent 1 The default configuration file zabbix_agentd.conf should be searched in the same directory where zabbix_agentd.exe is located instead of C:\zabbix_agentd.conf. The name of config file is already correct. Zabbix agent 2 zabbix_agent2.conf should be default configuration file name instead of zabbix_agent2.win.conf. Zabbix agent 2 already searches the default configuration file in the correct directory. Documentation The page https://www.zabbix.com/documentation/current/en/manual/appendix/install/windows_agent should be fixed/updated to reflect the reality. It should clarify, how Zabbix agent 1 and 2 should be correctly installed from archive. See the subtask (1) [D] for details. Fix versions I propose to do this fix for release 7.0. It is probably not a good idea to fix this in 6.0 LTS release, since the changes in ZA1 are breaking changes. Signoff:
| ||
Comment by Mihails Prihodko [ 2023 Aug 31 ] | ||
Available in versions:
| ||
Comment by Martins Valkovskis [ 2023 Sep 04 ] | ||
Updated documentation: | ||
Comment by MArk [ 2024 Feb 23 ] | ||
Thanks guys. |