[ZBXNEXT-4862] Zabbix configuration as code - save XML in git repository Created: 2018 Nov 16  Updated: 2021 May 23  Resolved: 2021 May 21

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

Type: New Feature Request Priority: Minor
Reporter: Burov Alexey Assignee: Unassigned
Resolution: Fixed Votes: 16
Labels: export, git, usability, xml
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: JPEG File xml-change-templates.jpg     PNG File zvz_dzedyfkdsahqpqhr7qmmshq.png    

 Description   

More and more products use the approach Something as code - build as code, continious delivery as code, infrastructure as code. Some monitoring systems also support "Monitoring as code" - e.g. Prometheus

It is very convenient to store something as code:

  1. You can see what changes someone made
  2. You can restore old system state from code
  3. You can review code
  4. You can use all the tools to work with the code - for example, a simple search in files

Approach something as code can be in several variants (include each other):

  1. Save the configuration as a code - just a copy of the system in code, but changes occur in UI (e.g TeamCity save XML)
  2. Change configuration only in code - we don't need think about conflict and sync beetwen UI and code (e.g. Kotlin DSL in TeamCity)
  3. You can change configuration both in code and in UI - hard to realize ,but friendly approach (I have no example  )

Zabbix can go from simple to complex, as TeamCIty (JetBrains CI-server)

To start make one-way sync - save exported XML to git repository with mentioning who made this change. 

 

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.

 

We hope that this feature will not take much time and will be useful to the community of wonderful monitoring system Zabbix!



 Comments   
Comment by richlv [ 2018 Nov 19 ]

This is essentially a duplicate of ZBXNEXT-2101.

Comment by Burov Alexey [ 2018 Nov 21 ]

I don't think so. We suggest realize periodic dump of XML in the VCS with info about WHO make this changes.

We don't suggest extend list of object which can exported, we will be satisfied hosts and templates 

Comment by Alexei Vladishev [ 2021 May 21 ]

Since Zabbix 5.4, you may keep templates in a Git repository as Yaml or JSON and use CI/CD pipeline to push changes to Zabbix using Zabbix API. I believe we close this ticket.

Comment by Pimmetje [ 2021 May 23 ]

@alexei Can  u add a link to the docs for this?

Generated at Fri Apr 26 06:56:01 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.