[ZBXNEXT-8273] Zabbix sender cannot use relative path in zabbix_agent2.conf file Created: 2022 Sep 14  Updated: 2024 Apr 10  Resolved: 2023 May 15

Status: Closed
Project: ZABBIX FEATURE REQUESTS
Component/s: Agent (G), Proxy (P), Server (S)
Affects Version/s: None
Fix Version/s: 6.0.18rc1, 6.4.3rc1, 7.0.0alpha1, 7.0 (plan)

Type: New Feature Request Priority: Major
Reporter: Karlis Salins Assignee: Dmitrijs Goloscapovs
Resolution: Fixed Votes: 6
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Causes
Duplicate
is duplicated by ZBX-22690 Error using zabbix_sender an a conf f... Closed
Team: Team A
Sprint: Sprint 97 (Feb 2023), Sprint 98 (Mar 2023), Sprint 99 (Apr 2023), Sprint 100 (May 2023)
Story Points: 1

 Description   

Zabbix Agent 2 5.0 - all plugin based stuff is inside the config file.

Zabbix Agent 2 6.0 - plugin configuration can be put in separate files in conf.d/ folder using include option

In 6.0 the default parameter for this is set to this relative path:

Include=./zabbix_agent2.d/plugins.d/*.conf

Under Include parameter definition, there are only absolute paths specified as valid ones:

# Include=
# Include=/usr/local/etc/zabbix_agent2.userparams.conf
# Include=/usr/local/etc/zabbix_agent2.conf.d/
# Include=/usr/local/etc/zabbix_agent2.conf.d/*.conf

The problem here is if you use the agent configuration file with Zabbix Sender.

You run sender command from lets say home directory like this:

zabbix_sender --config /etc/zabbix/zabbix_agent2.conf --key testkey --value testvalue

And then you will get this error:

zabbix_sender [1751532]: ./zabbix_agent2.d/plugins.d: [2] No such file or directory

This happens because zabbix_sender does not know this relative path.

I would propose moving the relative directory to an absolute one:

Include=/etc/zabbbix//zabbix_agent2.d/plugins.d/*.conf


 Comments   
Comment by Vladislavs Sokurenko [ 2023 Feb 14 ]

Zabbix sender fails to read from relative path because on Zabbix agent2 If a path is relative, it is padded with a directory of the current config file, it could be nice to have similar behaviour.

Comment by Dmitrijs Goloscapovs [ 2023 May 03 ]

Available in versions:
  - pre-6.0.18rc1 - 077d2ab428d, 93871676896
  - pre-6.4.3rc1 - ed0e5907595, a9503b88801
  - pre-7.0.0alpha1 - ae4da8e828c, d26a2d25255

Generated at Mon Jun 30 13:39:54 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.