This commit is contained in:
2025-10-31 23:24:47 +01:00
parent 76b0972ab6
commit 690ba2a23b
2 changed files with 64 additions and 8 deletions

View File

@@ -1,3 +1,66 @@
# zuplates
help updating zabbix templates
help updating zabbix templates
## install
* consider using venv
* install depdencies
```bash
pip install pyyaml
pip install requests
pip install zabbix_utils
```
* configure Zabbix access in `config.yml`
```
zabbix:
api:
url: https://your.zabbix.example.com
token: abc123
```
* user must have access to API `template.get`
## usage
* get an overview of *used* templates: `./main.py --overview`
```
Borg Backup Passive
Vendor:
Version:
UUID: 3077e7298167465b96d30503bcff4769
used by hosts:
devloop.de
!!! not found in templates.yml
FreeBSD by Zabbix agent
Vendor: Zabbix
Version: 7.0-2
UUID: a3dc630729e443139f4e608954fa6e19
used by hosts:
router.exmaple.com
...
```
* check for new versions and download known templates: `./main.py --check`
```
found update for Template Module Generic SNMPv2
found update for Template OS FreeBSD
found update for Ubiquiti AirOS by SNMP
found update for Website certificate by Zabbix agent 2
found update for Zabbix proxy health
found update for Zabbix server health
```
* new template versions saved in `downloads`
* manually import into zabbix
## known templates
* templates are looked up in `templates.yml`
* structure is like:
```yml
templates:
<uuid of template>:
vendor: <reference to vendors/vendor name>
path: <added to raw from vendor>
...
vendors:
<vendor name>:
raw: <generic part of vendor url for downloading yml template>
qry: <query to add to url>
```
* template download URL will be the concatination of `raw`, `path` and `qry`

View File

@@ -1,7 +0,0 @@
certifi==2025.10.5
charset-normalizer==3.4.4
idna==3.11
PyYAML==6.0.3
requests==2.32.5
urllib3==2.5.0
zabbix-utils==2.0.3