[ZBXNEXT-1603] ability to use frontend and API with read-only DB Created: 2013 Feb 01 Updated: 2023 Jul 20 |
|
Status: | Open |
Project: | ZABBIX FEATURE REQUESTS |
Component/s: | Frontend (F) |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Change Request | Priority: | Minor |
Reporter: | Kodai Terashima | Assignee: | Unassigned |
Resolution: | Unresolved | Votes: | 22 |
Labels: | database, frontend, performance, readonly, replicatedDB, scalability | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Issue Links: |
|
Description |
Having a feature that frontend and API can be used with read-only DB is helpful for off-load a database. For example, Zabbix server process and normal frontend work with master DB, and select-only frontend work with slave (read-only) DB (only viewing trigger and event status, values, graphs). |
Comments |
Comment by Oleksii Zagorskyi [ 2016 Sep 16 ] |
|
Comment by Dmitry Verkhoturov [ 2016 Sep 16 ] |
Patches for 2.4 and 3.0 are published in zabbix-patches github repo, feel free to use them: https://github.com/zabbix/zabbix-patches |
Comment by Vaclav Medek [ 2016 Oct 27 ] |
Hi, before patch error was : running on version 2.4.8, PostgreSQL replicated by Slony |
Comment by Dmitry Verkhoturov [ 2016 Oct 27 ] |
vmedek, I'm afraid my solution won't fit you because in my case Zabbix still modifies few tables, like 'sessions'. |
Comment by Vaclav Medek [ 2016 Oct 31 ] |
Thanks Dimitry for your hint. I made tables 'sessions', 'profiles' and 'user_history' r/w (and removed them from replication) and everything works now. |
Comment by Bartlomiej Kos [ 2019 Oct 24 ] |
Hello, It would be great if such functionality for the front-end would could be made official - like for example allowing to configure two databases for the front-end in zabbix.conf.php, where all the write queries would go to the master database and all the read queries would go to the slave database, and if the slave database is gone, all would go to the master. I realise this is not perfect and does not cover all corner cases (e.g. slave DB working fine but replication had stopped, etc.) but it would still be a great addition to the front-end's capabilities in a "use only if you know what you are doing" category. |