How to monitor UrBackup clients with Zabbix.
This code originally came from a Zabbix forum post by tmueko, plus a copy of the urbackup api by uroni.
These instructions are my fault -- please let me know if I've got something wrong. I am a million miles away from being an experienced Zabbix user and found installation process "quirky", hence this document. I do note that Zabbix 6.4 has definite usability improvements over 6.2, so well done to you folks.
/opt
, on your UrBackup server, or grab it via git
cd /opt
git clone git@github.com:kerryland/zabbix-urbackup.git
chmod +x /opt/zabbix-urbackup/urbackup-discovery.py
echo 'UserParameter=urbackup.discovery[*],/opt/zabbix-urbackup/urbackup-discovery.py $1 $2 $3' >> /etc/zabbix/zabbix_agentd.conf
zabbix_agentd -t urbackup.discovery
. It's OK if it fails as shown below:
urbackup.discovery [t|Traceback (most recent call last):
File "/opt/zabbix-urbackup/urbackup-discovery.py", line 14, in <module>
server = urbackup_api.urbackup_server(sys.argv[1],sys.argv[2],sys.argv[3])
IndexError: list index out of range]
zabbix_agentd -R userparameter_reload
Data collection | Templates
Import
button in top-right cornerUrbackup.yaml
file you downloaded earlierData collection | Hosts
), and add the "Urbackup" template to the host, add click "Update"./x
for some obscure reason. eg: http://127.0.0.1:55414/x
[{"client_version_string": "2.5.21", "delete_pending": "", "file_ok": true...
.{$UR_PASSWORD}
, {$UR_URL}
and {$UR_USER}
to match your environmentTADA! You should now have a whole pile of items and triggers defined for your urbackup clients.