[ZBXNEXT-3436] Add API Method configuration.reload Created: 2016 Sep 14  Updated: 2023 Sep 01  Resolved: 2023 Sep 01

Status: Closed
Project: ZABBIX FEATURE REQUESTS
Component/s: API (A)
Affects Version/s: None
Fix Version/s: None

Type: New Feature Request Priority: Major
Reporter: Strahinja Kustudic Assignee: Unassigned
Resolution: Won't fix Votes: 8
Labels: api, configuration, reload
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Sub-task
part of ZBXNEXT-5673 API method for global configuration c... Open

 Description   

Zabbix by default updates configuration from the database every 60 seconds. That means whenever you change something in the configuration you need to wait at least 60 seconds for it to be reloaded by the server. This usually isn't a big problem, except when you created/edit maintenance which you want to be active instantly. A good example is when your deployment software creates a new maintenance before it continues with the deploy. Currently if you want to automate the whole process your deployment software needs to wait 60 seconds after creating the maintenance before it can continuing, so that the maintenance gets read by the server.

It would be great if the API exposed a new method configuration.reload which would instantly reload the configuration cache. This would make automating the creation of maintenance a lot faster, as well as making any changes which you want to work instantly.

Currently the Zabbix server supports running zabbix_server -R config_cache_reload which sends a signal to the server to reload the configuration cache, but on thing is to call an API, and one is to have SSH access to the Zabbix server with the correct permissions.



 Comments   
Comment by Volker Fröhlich [ 2016 Sep 14 ]

You wait at most 60 seconds, not at least.

Comment by richlv [ 2016 Sep 14 ]

this would require accepting runtime control requests on the TCP port, and deciding on authorisation - the simplest being "superadmins only"

Comment by Strahinja Kustudic [ 2016 Sep 14 ]

@volter I wrote at least, since the deployment software needs to wait 60, becaue if you wait less then 60 seconds, the maintenance might not be enabled.

@richlv This problem could be solved in other ways, e.g. server could listen if a file was changed (which can be configurable in the configuration file), and the web server could touch that file or something similar.

Of course if the API is moved to the server, then this should be relatively easy to implement and probably won't be even needed, since the configuration changes could be instant. So that is one more reason to move API to server.

Comment by richlv [ 2016 Sep 14 ]

frontend already needs tcp port access to the server for a bunch of features, but it doesn't need a common fs with the server - introducing such a dependency might not be a good approach

Comment by Strahinja Kustudic [ 2016 Sep 14 ]

If it needs a TCP connection to the server for other things, then that is fine

I would totally be ok if maintenance.create/update would send a trigger to the server over TCP to read maintenance again (e.g. trigger configuration reload), since you shouldn't need to be a super admin to set maintenance. I don't remember ever needing the reload a configuration for anything, but maintenance.

Comment by Sandis Neilands (Inactive) [ 2016 Oct 12 ]

In addition to configuration.reload we also need a way to check the last sync completion time. On loaded systems sync is not instantaneous.

Indeed, in enterprise environments one often doesn't have Unix access to the servers so -R is absolutely not an option.

Comment by Sandis Neilands (Inactive) [ 2016 Oct 21 ]

Related (frontend): ZBXNEXT-3448.

Comment by Alexei Vladishev [ 2023 Sep 01 ]

I think that with the introduction of real-time configuration sync in Zabbix 6.x this functionality is no longer make sense. I am closing it.

Generated at Tue Nov 04 02:12:57 EET 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.