[ZBXNEXT-5172] zabbix-server upgrade from apt overwrites server configurationfile Created: 2019 Apr 12  Updated: 2019 Apr 15  Resolved: 2019 Apr 12

Status: Closed
Project: ZABBIX FEATURE REQUESTS
Component/s: Installation (I)
Affects Version/s: 3.0.26, 4.0.5
Fix Version/s: None

Type: Change Request Priority: Trivial
Reporter: Kalle Tuulos Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 16.04 LTS, Ubuntu 18.04 LTS


Issue Links:
Duplicate
duplicates ZBXNEXT-5086 Add include directory to server's and... Closed

 Description   

Zabbix server has been installed to Ubuntu computer using apt method from Zabbix official repository. When the server is upgraded using the "apt-get upgrade", configuration file gets usually overwritten. Please see as follows:

Setting up zabbix-server-mysql (1:4.0.6-1+xenial) ...

Configuration file '/etc/zabbix/zabbix_server.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_server.conf (Y/I/N/O/D/Z) [default=N] ? y
        Installing new version of config file /etc/zabbix/zabbix_server.conf ...

As I remember, the same problem is also on zabbix-proxy.

This should be corrected by using the same method in zabbix-agent i.e. creating a directory for local configuration and letting the local configuration to override values set in the distribution configuration file. Here is cut and paste from zabbix-agent configuration file - similar mechanism should be introduced to zabbix-server (and zabbix-proxy) as well.

      1. Option: Include
  1. You may include individual files or all files in a directory in the configuration file.
  2. Installing Zabbix will create include directory in /usr/local/etc, unless modified during the compile time.
    #
  3. Mandatory: no
  4. Default:
  5. Include=

Include=/etc/zabbix/zabbix_agentd.d/*.conf

  1. Include=/usr/local/etc/zabbix_agentd.userparams.conf
  2. Include=/usr/local/etc/zabbix_agentd.conf.d/
  3. Include=/usr/local/etc/zabbix_agentd.conf.d/*.conf

 

 



 Comments   
Comment by Edgar Akhmetshin [ 2019 Apr 12 ]

Hello Kalle,

The default action is to keep your current version for the deb packages. Does file overwriting occur in this case?

Regards,
Edgar

Comment by Kalle Tuulos [ 2019 Apr 12 ]

Hello Edgar

Negative - in default action, configuration files are not overwritten.

However, the master configuration file should be upgraded along with the actual zabbix-server, as sometimes, there are actually changes on the configuration file. Some of those changes are conflicting to local configuration, but usually, those don't matter. Thus it would be good to be able to have the local configuration stored in separate "local.conf" file, which is included from the master configuration file - just like with the zabbix agent. The possibility to use the local configuration file would also help when installing new instances, specially in case with zabbix proxies.

 

Comment by Edgar Akhmetshin [ 2019 Apr 12 ]

Kalle,

Tested recently - with (1) and (2), no file is discarded. With (1), the package maintainer's version is saved with the extension dpkg-dist, and with (2), your version is saved with the extension dpkg-old. This task looks more like ZBXNEXT request, not a bug.

Regards,
Edgar

Comment by dimir [ 2019 Apr 12 ]

Zabbix packages are correctly configured and acting properly during upgrade. This is standard deb packages procedure to handle configuration files. There is no bug in this report. Asking for splitting config files is a feature request, moving issue accordingly.

Comment by Glebs Ivanovskis [ 2019 Apr 12 ]

This idea goes along with ZBXNEXT-5086.

Asking for splitting config files is a feature request, moving issue accordingly.

Would be nice to update issue Title and Description accordingly.

Comment by dimir [ 2019 Apr 15 ]

Closing as duplicate of ZBXNEXT-5086

Generated at Thu Aug 14 21:26:53 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.