246 lines
8.0 KiB
YAML
246 lines
8.0 KiB
YAML
zabbix_export:
|
|
version: '7.0'
|
|
template_groups:
|
|
- uuid: cd6848345eb04289b2d5260c10e0d269
|
|
name: devloop
|
|
templates:
|
|
- uuid: 3077e7298167465b96d30503bcff4769
|
|
template: 'Template Borg Backup Passive'
|
|
name: 'Borg Backup Passive'
|
|
description: 'Check the last Borg Backup Archive, Visualize the sizes and checks if the backup older than one day'
|
|
vendor:
|
|
name: devloop
|
|
version: '1.0'
|
|
groups:
|
|
- name: devloop
|
|
items:
|
|
- uuid: 336cb21ab1d94ccd8c467554b2ac737f
|
|
name: 'Borg Archives Duration'
|
|
type: DEPENDENT
|
|
key: borg.duration
|
|
delay: '0'
|
|
history: 90d
|
|
value_type: FLOAT
|
|
units: s
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- '$.archives[0].duration'
|
|
master_item:
|
|
key: 'vfs.file.contents[/tmp/borg.json]'
|
|
tags:
|
|
- tag: Application
|
|
value: Backup
|
|
triggers:
|
|
- uuid: 9106b7035dd44b9794d052a70a9fec37
|
|
expression: 'last(/Template Borg Backup Passive/borg.duration)>{$BORG_BACKUP_CREATE_TIMEOUT}'
|
|
name: 'Borg Backup takes to long ({$BORG_BACKUP_CREATE_TIMEOUT})'
|
|
priority: WARNING
|
|
description: 'Check why, this should not normal. Only for the first backup.'
|
|
manual_close: 'YES'
|
|
- uuid: 87dcf43716a74a21b65feddce3d0f064
|
|
name: 'Borg Archives End Time'
|
|
type: DEPENDENT
|
|
key: borg.endtime
|
|
delay: '0'
|
|
history: 90d
|
|
units: unixtime
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- '$.archives[0].end'
|
|
- type: JAVASCRIPT
|
|
parameters:
|
|
- |
|
|
var datum = Date.parse(value);
|
|
return datum/1000;
|
|
- type: DISCARD_UNCHANGED
|
|
parameters:
|
|
- ''
|
|
master_item:
|
|
key: 'vfs.file.contents[/tmp/borg.json]'
|
|
tags:
|
|
- tag: Application
|
|
value: Backup
|
|
triggers:
|
|
- uuid: d6df5c18fbd14732bda75638a6922f79
|
|
expression: 'last(/Template Borg Backup Passive/borg.endtime)<now()-172800 or nodata(/Template Borg Backup Passive/borg.endtime,2d)=1'
|
|
name: 'Borg Backup Archive is to old (>48h)'
|
|
priority: HIGH
|
|
description: 'Backup ist zu alt!'
|
|
manual_close: 'YES'
|
|
- uuid: 1d41273ecf814024aab9a39db820ef53
|
|
name: 'Borg Archives Hostname'
|
|
type: DEPENDENT
|
|
key: borg.hostname
|
|
delay: '0'
|
|
history: 90d
|
|
value_type: TEXT
|
|
trends: '0'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- '$.archives[0].hostname'
|
|
- type: DISCARD_UNCHANGED
|
|
parameters:
|
|
- ''
|
|
master_item:
|
|
key: 'vfs.file.contents[/tmp/borg.json]'
|
|
tags:
|
|
- tag: Application
|
|
value: Backup
|
|
- uuid: 7ccd45201b76457aac950f3b78cb6f65
|
|
name: 'Borg Archives Name'
|
|
type: DEPENDENT
|
|
key: borg.name
|
|
delay: '0'
|
|
history: 90d
|
|
value_type: TEXT
|
|
trends: '0'
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- '$.archives[0].name'
|
|
- type: DISCARD_UNCHANGED
|
|
parameters:
|
|
- ''
|
|
master_item:
|
|
key: 'vfs.file.contents[/tmp/borg.json]'
|
|
tags:
|
|
- tag: Application
|
|
value: Backup
|
|
- uuid: 3eb83727e37e4776985bbd03c7162be5
|
|
name: 'Borg Archives Stats Compressed Size'
|
|
type: DEPENDENT
|
|
key: borg.stats.compressedsize
|
|
delay: '0'
|
|
history: 90d
|
|
units: b
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- '$.archives[0].stats.compressed_size'
|
|
master_item:
|
|
key: 'vfs.file.contents[/tmp/borg.json]'
|
|
tags:
|
|
- tag: Application
|
|
value: Backup
|
|
- uuid: d450490ae0cc4ec1a0742e4699338257
|
|
name: 'Borg Archives Stats Deduplicated Size'
|
|
type: DEPENDENT
|
|
key: borg.stats.deduplicated_size
|
|
delay: '0'
|
|
history: 90d
|
|
units: b
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- '$.archives[0].stats.deduplicated_size'
|
|
master_item:
|
|
key: 'vfs.file.contents[/tmp/borg.json]'
|
|
tags:
|
|
- tag: Application
|
|
value: Backup
|
|
- uuid: 0f7496d82a1e42d99ca5ad0b9a6e142d
|
|
name: 'Borg Archives Stats Number Files'
|
|
type: DEPENDENT
|
|
key: borg.stats.nfiles
|
|
delay: '0'
|
|
history: 90d
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- '$.archives[0].stats.nfiles'
|
|
master_item:
|
|
key: 'vfs.file.contents[/tmp/borg.json]'
|
|
tags:
|
|
- tag: Application
|
|
value: Backup
|
|
- uuid: 1247416a5ecb443d87839be21ebbf9a3
|
|
name: 'Borg Archives Stats Original Size'
|
|
type: DEPENDENT
|
|
key: borg.stats.original_size
|
|
delay: '0'
|
|
history: 90d
|
|
units: b
|
|
preprocessing:
|
|
- type: JSONPATH
|
|
parameters:
|
|
- '$.archives[0].stats.original_size'
|
|
master_item:
|
|
key: 'vfs.file.contents[/tmp/borg.json]'
|
|
tags:
|
|
- tag: Application
|
|
value: Backup
|
|
- uuid: fb86659de9b749e9b7067c36c7c156f0
|
|
name: Borg.Json
|
|
key: 'vfs.file.contents[/tmp/borg.json]'
|
|
delay: 2h
|
|
history: 2d
|
|
value_type: TEXT
|
|
trends: '0'
|
|
description: 'Get the last archive as JSON'
|
|
- uuid: 0b42b36f90f04847847c47d8745c5615
|
|
name: 'Borg Json File Exists'
|
|
key: 'vfs.file.exists[/tmp/borg.json]'
|
|
delay: 2h
|
|
history: 90d
|
|
tags:
|
|
- tag: Application
|
|
value: Backup
|
|
- uuid: 560085948d5d4362babe4149c0fdc442
|
|
name: 'Borg Json File Size'
|
|
key: 'vfs.file.size[/tmp/borg.json]'
|
|
delay: 2h
|
|
history: 90d
|
|
tags:
|
|
- tag: Application
|
|
value: Backup
|
|
macros:
|
|
- macro: '{$BORG_BACKUP_CREATE_TIMEOUT}'
|
|
value: 15m
|
|
description: 'Maximal Duration of creating the Backup in Minutes'
|
|
triggers:
|
|
- uuid: 17ef68f9bfd949a39a6d5a940f33bf9f
|
|
expression: 'last(/Template Borg Backup Passive/vfs.file.exists[/tmp/borg.json],#2)=0 or last(/Template Borg Backup Passive/vfs.file.size[/tmp/borg.json])<200'
|
|
name: 'Invalid Borg JSON File'
|
|
priority: WARNING
|
|
description: 'Check if backup script is executed via cron'
|
|
manual_close: 'YES'
|
|
graphs:
|
|
- uuid: 65f56ed68e92403da4957f4ae45b81f6
|
|
name: 'Backup Archive Size'
|
|
show_triggers: 'NO'
|
|
ymin_type_1: FIXED
|
|
graph_items:
|
|
- color: 42A5F5
|
|
item:
|
|
host: 'Template Borg Backup Passive'
|
|
key: borg.stats.compressedsize
|
|
- sortorder: '1'
|
|
color: 1B5E20
|
|
item:
|
|
host: 'Template Borg Backup Passive'
|
|
key: borg.stats.deduplicated_size
|
|
- sortorder: '2'
|
|
color: FF0000
|
|
item:
|
|
host: 'Template Borg Backup Passive'
|
|
key: borg.stats.original_size
|
|
- uuid: 17d5a2ac075748ff899bca3c1374de6b
|
|
name: 'Backup Duration'
|
|
ymin_type_1: FIXED
|
|
graph_items:
|
|
- color: 1A7C11
|
|
item:
|
|
host: 'Template Borg Backup Passive'
|
|
key: borg.duration
|
|
- uuid: 8e582251b8544534bad0cfeaa5ecb802
|
|
name: 'Backuped Files'
|
|
ymin_type_1: FIXED
|
|
graph_items:
|
|
- color: 1A7C11
|
|
item:
|
|
host: 'Template Borg Backup Passive'
|
|
key: borg.stats.nfiles
|