-
Notifications
You must be signed in to change notification settings - Fork 3
/
zabbix-barman-items.conf
24 lines (21 loc) · 2.58 KB
/
zabbix-barman-items.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
UserParameter=monitoring.barman.overall[*], sudo -u barman /usr/bin/barman check --nagios $1 | grep OK -c
UserParameter=monitoring.barman.ssh[*], sudo -u barman /usr/bin/barman check $1 | grep "ssh: OK" -c
UserParameter=monitoring.barman.pgconnection[*], sudo -u barman /usr/bin/barman check $1 | grep "PostgreSQL: OK" -c
UserParameter=monitoring.barman.superuser[*], sudo -u barman /usr/bin/barman check $1 | grep "superuser: OK" -c
UserParameter=monitoring.barman.directories[*], sudo -u barman /usr/bin/barman check $1 | grep "directories: OK" -c
UserParameter=monitoring.barman.retention[*], sudo -u barman /usr/bin/barman check $1 | grep "retention policy settings: OK" -c
UserParameter=monitoring.barman.backupage[*], sudo -u barman /usr/bin/barman check $1 | grep "backup maximum age: OK" -c
UserParameter=monitoring.compression[*], sudo -u barman /usr/bin/barman check $1 | grep "compression settings: OK" -c
UserParameter=monitoring.barman.redundancy.req[*], sudo -u barman /usr/bin/barman check $1 | grep "minimum redundancy requirements: OK" -c
UserParameter=monitoring.barman.redundancy.count[*],sudo -u barman -s bash -c 'barman check $1 | grep "minimum redundancy requirements:" | cut -d " " -f 6
UserParameter=monitoring.barman.recovery_state[*], sudo -u barman /usr/bin/barman check $1 | grep "not in recovery: OK" -c
UserParameter=monitoring.barman.archive_mode[*], sudo -u barman /usr/bin/barman check $1 | grep "archive_mode: OK" -c
UserParameter=monitoring.barman.archive_command[*], sudo -u barman /usr/bin/barman check $1 | grep "archive_command: OK" -c
UserParameter=monitoring.barman.continuous_archiving[*], sudo -u barman /usr/bin/barman check $1 | grep "continuous archiving: OK" -c
UserParameter=monitoring.barman.archiver_errors[*], sudo -u barman /usr/bin/barman check $1 | grep "archiver errors: OK" -c
## IF streaming replica enabled
UserParameter=monitoring.barman.pgreceivelogcompatible[*], sudo -u barman /usr/bin/barman check $1 | grep "pg_receivexlog compatible: OK" -c
UserParameter=monitoring.barman.streaming[*], sudo -u barman /usr/bin/barman check $1 | grep "PostgreSQL streaming: OK" -c
UserParameter=monitoring.barman.replicationslot[*], sudo -u barman /usr/bin/barman check $1 | grep "replication slot: OK" -c
UserParameter=monitoring.barman.pgreceivelog[*], sudo -u barman /usr/bin/barman check $1 | grep "pg_receivexlog: OK" -c
UserParameter=monitoring.barman.discovery,/bin/echo -n '{"data":['; for servers in $(sudo -u barman /usr/bin/barman list-server | grep -v inactive | cut -d " " -f 1); do /bin/echo -n "{\"{#BACKED_SERVERS}\": \"$servers\"},"; done |sed -e 's:,$::'; /bin/echo -n ']}'