All Projects → southbridgeio → zabbix-review-export-import

southbridgeio / zabbix-review-export-import

Licence: other
Clone of zabbix-review-export with added import object(s) feature

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to zabbix-review-export-import

blender-xray
STALKER (aka xray-engine) import/export plugin for Blender 3D
Stars: ✭ 132 (+266.67%)
Mutual labels:  export, import
ProcessMigrator
ProcessWire module that facilitates automated migration and sharing of page trees along with their templates and fields.
Stars: ✭ 29 (-19.44%)
Mutual labels:  export, import
sync-magento-2-migration
Release of rough proof of concept from 2018 that allows to import and export millions of products quickly
Stars: ✭ 51 (+41.67%)
Mutual labels:  export, import
connect-backup
A tool to backup and restore AWS Connect, with some useful other utilities too
Stars: ✭ 19 (-47.22%)
Mutual labels:  export, import
qgis-kmltools-plugin
Fast KML Import and Export Plugin for QGIS
Stars: ✭ 45 (+25%)
Mutual labels:  export, import
format-imports-vscode
Format imports and exports for JavaScript and TypeScript in VS Code.
Stars: ✭ 60 (+66.67%)
Mutual labels:  export, import
DataDefinitions
Data Definitions Plugin for Pimcore
Stars: ✭ 70 (+94.44%)
Mutual labels:  export, import
Portphp
Data import/export framework for PHP
Stars: ✭ 225 (+525%)
Mutual labels:  export, import
excel mysql
Module for import Excel files to MySQL table and export MySQL table to Excel file using PHPExcel
Stars: ✭ 30 (-16.67%)
Mutual labels:  export, import
great-migration
Copy objects from Rackspace to S3
Stars: ✭ 15 (-58.33%)
Mutual labels:  export, import
craft3-blockonomicon
Manage matrix fields on a per-block basis. Bundle presentation with blocks. Render entire matrices with a single line.
Stars: ✭ 32 (-11.11%)
Mutual labels:  export, import
VBA-Import-Export
Export & Import VBA code for use with Git (or any VCS)
Stars: ✭ 14 (-61.11%)
Mutual labels:  export, import
cassandra-exporter
Simple Tool to Export / Import Cassandra Tables into JSON
Stars: ✭ 44 (+22.22%)
Mutual labels:  export, import
FSDevTools
Project to support developer experience (DX) with FirstSpirit template development by offering a connection between a VCS like Git and FirstSpirit.
Stars: ✭ 29 (-19.44%)
Mutual labels:  export, import
open2fa
Two-factor authentication app with import/export for iOS and macOS. All codes encrypted with AES 256. FaceID & TouchID support included. Written with love in SwiftUI ❤️
Stars: ✭ 24 (-33.33%)
Mutual labels:  export, import
importer-exporter
3D City Database client for high-performance import and export of 3D city model data
Stars: ✭ 104 (+188.89%)
Mutual labels:  export, import
Sketchup Stl
A SketchUp Ruby Extension that adds STL (STereoLithography) file format import and export.
Stars: ✭ 214 (+494.44%)
Mutual labels:  export, import
Dataset Serialize
JSON to DataSet and DataSet to JSON converter for Delphi and Lazarus (FPC)
Stars: ✭ 213 (+491.67%)
Mutual labels:  export, import
skinner
Skin export / import tools for Autodesk Maya
Stars: ✭ 68 (+88.89%)
Mutual labels:  export, import
infraverse
Infrastructure Platforms and Applications Comparison
Stars: ✭ 77 (+113.89%)
Mutual labels:  gitlab, cicd

Zabbix Review and Export/Import

With Zabbix review and export (backup)/import you can create review mechanism and save/restore zabbix configuration as code (Monitoring as Code)

You can export (backup) all hosts templates and other object with zabbix-export.py script.

You can also import (restore) many types of zabbix objects from YAML dump with zabbix-import.py script (note that order of import is matters, i.e., you cant add user if there is no mediatype for them, etc...). Already existed objects will be skipped. Object type is autodetected, but may be pointed manually (it is much faster for single-file import operations)/

Requirements

If you want use review (or Monitoring as Code:

Make export and backup

It's simple to start use this script as backup mechanism:

# git clone THIS_REPO or download and unpack archive

python -mpip install -r requirements.txt

# smoke test :)
python ./zabbix-export.py --help

# backup to current folder, save XML and JSON
python ./zabbix-export.py --zabbix-url https://zabbix.example.com --zabbix-username user --zabbix-password password

# backup only hosts in YAML format
python ./zabbix-export.py --save-yaml --zabbix-url https://zabbix.example.com --zabbix-username user --zabbix-password password --only hosts

# backup to custom folder in YAML format
python ./zabbix-export.py --save-yaml --directory /home/username/path/to/zabbix-yaml --zabbix-url https://zabbix.example.com --zabbix-username user --zabbix-password password

Restore from YAML dump

Few examples:

export ZABBIX_URL="https://zabbix.instan.ce"
export ZABBIX_USERNAME="user.name"
export ZABBIX_PASSWORD="secret"

./zabbix-import.py /path/to/file.yaml

./zabbix-import.py --type host /path/fo/repo/hosts/*

Make review

You want to make review (Moniroting as Code). Read more on habr.com: RU, EN translated

  1. Fork this repository to you GitLab account or instance (e.g. groupname/zabbix-review-export)
  2. Create repository where will be saved XML and YAML (e.g. two repositories groupname/zabbix-xml and groupname/zabbix-yaml. Do first (init) commit (create empty README.md).
  3. Create two branches in this repos: master and develop. In repository groupname/zabbix-xml set develop as a default branch.
  4. Specify Project Variables for all variables, specified on top of .gitlab-ci.yml
  5. Change jobs in .gitlab-ci.yml and leave the ones you need job in .gitlab-ci.yml and change to you environment (see commented examples block).
  6. Try to run manual job YAML zabbix
  7. Create merge request develop=>master in zabbix-yaml. For first time you can merge without review, it's too hard :)
  8. Configure Schedule (eg. every week)
  9. Change some host, template or other supported objects in zabbix, run manual job and create merge request again. Enjoy!

Notes

Use two repositories for XML+JSON (raw-format) and readable YAML format:

  • XML + JSON will be useful if you want restore some object after remove or a large number of changes.
  • YAML format is more suitable for people to read and review changes. The script removes all empty values.

Create empty merge request develop=>master after merge and receive notifications at changes (schedule or manual jobs run) on your email.

To answer for the question "Who make this changes?" you need use Zabbix Audit. It's difficult but possible.

Supported objects

Use standard zabbix export functional:

  • hosts
  • templates
  • screen

Representing objects as JSON using the API:

  • mediatypes
  • actions

Known issues

  • ZBX-15175: Zabbix export - host's xml does not contain overrides or diff to templates (e.g. item's storage period, trigger.priority, trigger.status=disables\enabled)
  • ZBXNEXT-4862: The implementation of functionality in Zabbix. Zabbix configuration as code - save XML in git repository

Screenshots

YAML change action: yaml-change-action.png

YAML change trigger expression: yaml-change-trigger-expression.png

YAML link template yaml-link-template.jpg

XML change templates (but we recommend use YAML for review and XML only for backup): xml-change-templates.jpg

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].