zabbix-agent: Use borg wrapper for monitoring

Signed-off-by: Florian Pritz <bluewind@xinu.at>
This commit is contained in:
Florian Pritz 2018-03-12 15:42:59 +01:00
parent 690945a156
commit 04451fe4c6
No known key found for this signature in database
GPG key ID: 6D1655C14CE1C13E

View file

@ -6,7 +6,7 @@ use autodie;
use JSON;
use POSIX;
my $json = decode_json(`borg list --json --format '{start}{end}' --sort-by timestamp --last 1`);
my $json = decode_json(`/usr/local/bin/borg list --json --format '{start}{end}' --sort-by timestamp --last 1`);
print encode_json({
last_archive => {
is_checkpoint => $json->{archives}[0]->{archive} =~ m/.checkpoint$/ ? 1 : 0,