66 lines
2.8 KiB
YAML
66 lines
2.8 KiB
YAML
zabbix_export:
|
|
version: '7.0'
|
|
template_groups:
|
|
- uuid: e29f7cbf75cf41cb81078cb4c10d584a
|
|
name: 'Templates/Databases'
|
|
templates:
|
|
- uuid: 69899eb3126b4c62b70351f305b69dd9
|
|
template: 'Zabbix Partitioning Monitor'
|
|
name: 'Zabbix Partitioning Monitor'
|
|
description: |
|
|
Monitor Zabbix Database Partitioning.
|
|
Prerequisites:
|
|
1. Install zabbix_partitioning.py on the Zabbix Server/Proxy.
|
|
2. Configure userparameter for automatic discovery:
|
|
UserParameter=zabbix.partitioning.discovery[*], /usr/local/bin/zabbix_partitioning.py -c $1 --discovery
|
|
UserParameter=zabbix.partitioning.check[*], /usr/local/bin/zabbix_partitioning.py -c $1 --check-days $2
|
|
|
|
Or use Docker wrapper scripts.
|
|
|
|
groups:
|
|
- name: 'Templates/Databases'
|
|
items:
|
|
- uuid: bc753e750cc2485f917ba1f023c87d05
|
|
name: 'Partitioning Last Run Status'
|
|
type: TRAP
|
|
key: partitioning.run.status
|
|
delay: 0
|
|
history: 7d
|
|
trends: '0'
|
|
value_type: TEXT
|
|
description: 'Send "Success" or "Failed" via zabbix_sender or check log file'
|
|
triggers:
|
|
- uuid: 25497978dbb943e49dac8f3b9db91c29
|
|
expression: 'find(/Zabbix Partitioning Monitor/partitioning.run.status,,"like","Failed")=1'
|
|
name: 'Zabbix Partitioning Failed'
|
|
priority: HIGH
|
|
description: 'The partitioning script reported a failure.'
|
|
tags:
|
|
- tag: services
|
|
value: database
|
|
|
|
discovery_rules:
|
|
- uuid: 097c96467035468a80ce5c519b0297bb
|
|
name: 'Partitioning Discovery'
|
|
key: 'zabbix.partitioning.discovery[/etc/zabbix/zabbix_partitioning.conf]'
|
|
delay: 1h
|
|
description: 'Discover partitioned tables'
|
|
item_prototypes:
|
|
- uuid: 1fbff85191c244dca956be7a94bf08a3
|
|
name: 'Partitions remaining: {#TABLE}'
|
|
key: 'zabbix.partitioning.check[/etc/zabbix/zabbix_partitioning.conf, {#TABLE}]'
|
|
delay: 12h
|
|
history: 7d
|
|
description: 'Days until the last partition runs out for {#TABLE}'
|
|
tags:
|
|
- tag: component
|
|
value: partitioning
|
|
- tag: table
|
|
value: '{#TABLE}'
|
|
trigger_prototypes:
|
|
- uuid: da23fae76a41455c86c58267d6d9f86d
|
|
expression: 'last(/Zabbix Partitioning Monitor/zabbix.partitioning.check[/etc/zabbix/zabbix_partitioning.conf, {#TABLE}])<=3'
|
|
name: 'Partitioning critical: {#TABLE} has less than 3 days of partitions'
|
|
priority: HIGH
|
|
description: 'New partitions are not being created. Check the script logs.'
|