[ZBXNEXT-4641] Include external configuration file as default to improve deployment and upgrade Created: 2018 Jul 17  Updated: 2022 Nov 02

Status: Open
Project: ZABBIX FEATURE REQUESTS
Component/s: Agent (G), Packages (C), Proxy (P), Server (S)
Affects Version/s: 3.4.11, 4.0.0rc1
Fix Version/s: None

Type: Change Request Priority: Minor
Reporter: Paolo Rossi Assignee: dimir
Resolution: Unresolved Votes: 8
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux


Issue Links:
Duplicate
is duplicated by ZBXNEXT-5086 Add include directory to server's and... Closed
is duplicated by ZBX-14363 The Zabbix Proxy Debian deb package's... Closed

 Description   

I started to use Zabbix appliance (server, proxy and agent) by editing zabbix_*.conf. Almost every time I upgrade one of them, the classic

Configuration file '/etc/zabbix/zabbix_proxy.conf'

 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** zabbix_proxy.conf (Y/I/N/O/D/Z) [default=N] 


pops up.

So I reset the conf file to its default and add only one line at the end:

 

Include=/etc/zabbix/zabbix_proxy_local.conf

 

In this way, the diff are quicker to inspect, having moved all the customized parameters to an external file.

Still, I have to accept all new changes made by package distributor and then re-add the last line.

It would be convenient for sysadmin, if zabbix would include, as default, every .conf inside a directory, for example /etc/zabbix/zabbix_proxy.d/.conf. Like Apache or MySQL do. In this way using orchestration tool to upgrade many proxies and agent would proceed uninterruptedly.

 



 Comments   
Comment by dimir [ 2018 Jul 17 ]

Currently in our packages we only include by default in agent. For server/proxy there is no such thing there. I'm not sure why, I'll try to find out. Suggestions are welcome.

Comment by Paolo Rossi [ 2018 Jul 17 ]

Agent already has such line but maybe should be at the end? Custom configuration should override any default specified in standard /etc/zabbix/zabbix_agentd.conf

For server/proxy I think same approach could be ok. You could use:

/etc/zabbix/zabbix_proxy.d/*conf
/etc/zabbix/zabbix_server.d/*conf

 
The only drawback is that agent already has a directory (zabbix_agentd.d) where other config files are placed. If I get this right, order or file *.conf included is not deterministic...

You could, otherwise, include specific file name such as:

/etc/zabbix/zabbix_agentd.d/zabbix_agentd.conf
/etc/zabbix/zabbix_proxy.d/zabbix_proxy.conf
/etc/zabbix/zabbix_server.d/zabbix_server.conf

or

/etc/zabbix/zabbix_agentd_local.conf
/etc/zabbix/zabbix_proxy_local.conf
/etc/zabbix/zabbix_server_local.conf

But will the startup complains if one of those files is missing?

Comment by Marco Hofmann [ 2018 Sep 25 ]

I opened a similar feature request. There should be a default include, in every component, server, proxy, agent. Preferebly exactly like the agent does it:
Include=/etc/zabbix/zabbix_agentd.d/*.conf
It is arguable if it should be the last line, good point!

But the most important part is your very first argument:
Package distributor has shipped an updated version.
It shouldn't be necessary do deal with it, just write your own config in an include, that gets read in by default, just like the agent.

I already wrote down my wishes in https://support.zabbix.com/browse/ZBX-14363 which is a marked as a duplicate of this request. I voted for this one.

Thank you.

Comment by Glebs Ivanovskis [ 2019 May 30 ]

ZBXNEXT-5086 explains another reason to finally implement this.

Comment by Shawn Heisey [ 2022 Oct 27 ]

Another vote from me, for the .d directory structure.

I see that /etc/zabbix/zabbix_agent2.conf has the include line at the end.  Awesome.

Generated at Wed Apr 24 16:00:28 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.