Compare commits
2 Commits
8d4a1d16f9
...
690ba2a23b
| Author | SHA1 | Date | |
|---|---|---|---|
| 690ba2a23b | |||
| 76b0972ab6 |
63
README.md
63
README.md
@@ -1,3 +1,66 @@
|
|||||||
# zuplates
|
# 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`
|
||||||
@@ -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
|
|
||||||
@@ -1,10 +1,34 @@
|
|||||||
templates:
|
templates:
|
||||||
a3dc630729e443139f4e608954fa6e19:
|
4cb1aabe2b704b5c882963c2ef87d8f6:
|
||||||
vendor: Zabbix
|
vendor: Zabbix
|
||||||
path: os/freebsd/template_os_freebsd.yaml
|
path: net/generic_snmp_snmp/template_module_generic_snmp_snmp.yaml
|
||||||
5630ec1b1baf449abe1bc5521f85fe6c:
|
5630ec1b1baf449abe1bc5521f85fe6c:
|
||||||
vendor: Zabbix
|
vendor: Zabbix
|
||||||
path: app/certificate_agent2/template_app_certificate_agent2.yaml
|
path: app/certificate_agent2/template_app_certificate_agent2.yaml
|
||||||
|
6c235d126c1f4895acfe2156b140a886:
|
||||||
|
vendor: Zabbix
|
||||||
|
path: net/ubiquiti_airos_snmp/template_net_ubiquiti_airos_snmp.yaml
|
||||||
|
a3dc630729e443139f4e608954fa6e19:
|
||||||
|
vendor: Zabbix
|
||||||
|
path: os/freebsd/template_os_freebsd.yaml
|
||||||
|
d0ef7d659a8f4beaaabfc4b6134e737a:
|
||||||
|
vendor: Zabbix
|
||||||
|
path: db/postgresql_agent2/template_db_postgresql_agent2.yaml
|
||||||
|
dd114bf0fb2f46bc84840f1bb24e2b23:
|
||||||
|
vendor: Zabbix
|
||||||
|
path: app/zabbix_proxy/template_app_zabbix_proxy.yaml
|
||||||
|
e2307c94f1744af7a8f1f458a67af424:
|
||||||
|
vendor: Zabbix
|
||||||
|
path: os/linux_active/template_os_linux_active.yaml
|
||||||
|
e2d2b4e4ac28483996cc11fe42823d57:
|
||||||
|
vendor: Zabbix
|
||||||
|
path: app/zabbix_server/template_app_zabbix_server.yaml
|
||||||
|
e518b1340ce44d7389d2cc7c304a97b4:
|
||||||
|
vendor: Zabbix
|
||||||
|
path: server/smart_agent2_active/template_module_smart_agent2_active.yaml
|
||||||
|
f8f7908280354f2abeed07dc788c3747:
|
||||||
|
vendor: Zabbix
|
||||||
|
path: os/linux/template_os_linux.yaml
|
||||||
vendors:
|
vendors:
|
||||||
Zabbix:
|
Zabbix:
|
||||||
raw: https://git.zabbix.com/projects/ZBX/repos/zabbix/raw/templates/
|
raw: https://git.zabbix.com/projects/ZBX/repos/zabbix/raw/templates/
|
||||||
|
|||||||
Reference in New Issue
Block a user