Verified Commit 83dfa015 authored by Florian Pritz's avatar Florian Pritz
Browse files

zabbix-agent: Use JSON::XS for borg parsing



JSON::PP doesn't parse json that contains newslines (human readble
json), but JSON::XS parses that just fine. borg outputs readable json so
this is necessary.

Signed-off-by: Florian Pritz's avatarFlorian Pritz <bluewind@xinu.at>
parent 04451fe4
......@@ -3,7 +3,7 @@ use strict;
use warnings;
use autodie;
use JSON;
use JSON::XS;
use POSIX;
my $json = decode_json(`/usr/local/bin/borg list --json --format '{start}{end}' --sort-by timestamp --last 1`);
......
......@@ -4,7 +4,7 @@
pacman: name=zabbix-agent,python-dbus
- name: install packages for borg monitoring
pacman: name=perl-json
pacman: name=perl-json-xs
when: "'borg-clients' in group_names"
- name: install packages for nginx monitoring
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment