[ZBXNEXT-4863] Zabbix Configuration as a Code (ZCaasC) Created: 2018 Nov 19 Updated: 2023 Oct 12 |
|
Status: | Open |
Project: | ZABBIX FEATURE REQUESTS |
Component/s: | Frontend (F) |
Affects Version/s: | 4.2 (plan) |
Fix Version/s: | None |
Type: | Change Request | Priority: | Trivial |
Reporter: | Aecio Pires | Assignee: | Valdis Murzins |
Resolution: | Unresolved | Votes: | 31 |
Labels: | api, frontend, usability | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Frontend and API Zabbix |
Issue Links: |
|
Description |
Description: Develop a plugin or functionality to be made available in a submenu (under the Administration menu) where you can export and import the entire Zabbix configuration into YAML files [1] (YAML Is not Markup Language) or XML (Extensible Markup Language) [2]. Motivation: Zabbix currently enables you to export and import XML files for some functionality (Maps, Screens, Templates, Hosts) and also allows interaction with the API to export/import all configuration. But this does not solve a problem: automating the configuration of a Zabbix server pool and manage configuration as a code. For each Zabbix server, there is a set of manual activities: such as user registration, SLA, customer business suitability, among others. This does not make it possible to scale productivity to an X number of servers, and the time to configure them is directly related to the number of people involved in the configuration, number of servers, expertise of the people involved, and configuration complexity to suit the business. Even if a Zabbix is configured for multiple clients, but there are settings that are common or can be reused for multiple clients. Example of a file used by Jenkins. [5].
|
Comments |
Comment by alex dekker [ 2018 Nov 19 ] |
I like the idea of being able to quickly deploy a known-good "base config" of Zabbix, without having to manually recreate stuff like regular expressions. I would see this as a continuation of the existing XML import/export functionality. |
Comment by alex dekker [ 2018 Nov 19 ] |
Also, could be used to migrate between DBs where you don't care about historic data. |
Comment by richlv [ 2018 Nov 19 ] |
This is essentially a duplicate of |
Comment by Burov Alexey [ 2019 Apr 01 ] |
Zabbix as Code - great idea! First step is "Save all object as yaml" - We implemented a similar mechanism in third-party toolkit https://gitlab.com/devopshq/zabbix-review-export, But it would be more convenient to have a built-in mechanism. |
Comment by Aecio Pires [ 2019 Apr 01 ] |
Thank you @Burov! You understood my suggestion perfectly with ZCasC. I saw the code you implemented. I will be showing this idea and his project in the talk: "Managing Zabbix with Terraform" during https://conference.zabbix.com.br/en/agenda/ in Brazil in the presence of @Alexei Vladishev. I have hope to draw attention to this theme. |
Comment by Aecio Pires [ 2019 Apr 30 ] |
@Burov Alexey, I presented this idea for @avladishev at Zabbix Conference Latam 2019 in Brazil and I presented a use case of Zabbix deploy with Terraform and I cited the work that you did at https://gitlab.com/ devopshq/zabbix-review-export See the slides: https://www.slideshare.net/aeciopires/management-zabbix-with-terraform
Alexei was interested in implementing this in the long run and this work will start in Zabbix 4.4 where he already showed that it is in the Roadmap to leave templates, items and triggers in the YAML pattern instead of XML. |
Comment by Burov Alexey [ 2019 Apr 30 ] |
@aeciopires great news, thanks you! We look forward to Zabbix 4.4 |
Comment by patrik uytterhoeven [ 2019 Oct 02 ] |
i suppose this is moved to 5.0 as i don't see any progress for 4.4 ? |
Comment by Aecio Pires [ 2019 Oct 02 ] |
@patrik no progress of this functionality in Zabbix 4.4. Maybe in 5.0. |
Comment by Denis Kot [ 2019 Oct 02 ] |
I'm +1 for support Zabbix in Terraform. What Terraform (or provider) does is makes API calls to, i.e. AWS API. So all we need is Zabbix provider to Terraform. |
Comment by Aecio Pires [ 2019 Oct 02 ] |
Hello @Denis! There is this provider for Terraform https://github.com/dainis/terraform-provider-zabbix But the terraform provider does not replace ZCasC functionality... the terraform provider is very welcome while ZCasC is not implemented. Note that the provider needs more developers to improve the quality and quantity of methods that make use of the Zabbix API. I could help but I don't know how to program in Go https://golang.org/ |
Comment by Multazim Deshmukh [ 2020 Mar 14 ] |
As Zabbix API doesn't provide ability to export following sections so it should be added first. Configuration: Actions, Event correlation, Discovery, Services |