|
2 | 2 |
|
3 | 3 | This Python script aims to resolve compatability issues when migrating Zabbix |
4 | 4 | template XML files between versions of Zabbix. For example, you may wish to |
5 | | -import a Zabbix v3.2 template into Zabbix v2.2. This operation will likely fail |
6 | | -if new features have been implemented in the exported template. |
| 5 | +import a Zabbix v3.2 template into Zabbix v2.0. |
| 6 | + |
| 7 | +The script works by applying conversion rules to a template, which manipulate |
| 8 | +the template XML to match the desired Zabbix version template format. |
| 9 | + |
| 10 | +To convert a Zabbix 3.2 template for import into v2.0: |
| 11 | + |
| 12 | + $ zabbix-template-convertor -o 2.0 my_template.xml > my_template-2.0.xml |
7 | 13 |
|
8 | 14 | __WARNING__: This project is still under active development and not ready for |
9 | 15 | release. |
10 | 16 |
|
| 17 | +``` |
| 18 | +$ zabbix-template-convertor -h |
| 19 | +usage: zabbix-template-convertor [-h] [-v] -o X.Y.Z [-s] file |
| 20 | +
|
| 21 | +Migrate Zabbix templates between versions |
| 22 | +
|
| 23 | +positional arguments: |
| 24 | + file Zabbix template XML file |
| 25 | +
|
| 26 | +optional arguments: |
| 27 | + -h, --help show this help message and exit |
| 28 | + -v, --version show program's version number and exit |
| 29 | + -o X.Y.Z, --output-version X.Y.Z |
| 30 | + target Zabbix version |
| 31 | + -s, --squash-value-maps |
| 32 | + remove references to value maps for versions older |
| 33 | + than 3.0.0 |
| 34 | +
|
| 35 | +``` |
| 36 | + |
| 37 | + |
| 38 | +## Coverage |
| 39 | + |
| 40 | +This project relies heavily on the community to report incompatability problems |
| 41 | +when importing templates. |
| 42 | + |
| 43 | +__Please raise an issue__ if you find a template that won't import after being |
| 44 | +converted. Be sure to include the error messages and template file. |
| 45 | + |
| 46 | +Over time, as conversion rules are added, the script should become more comprehensive, and more reliable. |
| 47 | + |
| 48 | + |
| 49 | +## Installation |
| 50 | + |
| 51 | +Copy the script file to your bin directory and add the executable flag: |
| 52 | + |
| 53 | + $ curl -Lo /bin/zabbix-template-convertor \ |
| 54 | + https://raw.githubusercontent.com/cavaliercoder/zabbix-template-convertor/master/zabbix-template-convertor |
| 55 | + $ chmod +x /bin/zabbix-template-convertor |
| 56 | + |
| 57 | + |
11 | 58 | ## License |
12 | 59 |
|
13 | 60 | Copyright (c) 2015 Ryan Armstrong |
|
0 commit comments