I use have a custom script that runs on the host using the system.run that pushes data the zabbix server using zabbix_sender. Attached is the perl script and xml file. Someone asked about it on the BackupPC mailing list, so I thought I would post it here. Save the perl script to /etc/zabbix/scripts/ or else change the system.run command in the template to where ever you save the file to. You might also need to change this line inside the perl script to point to the location of BackupPC lib directory:
use lib "/usr/local/BackupPC/lib";
You need to have sudo configured so this script can be run has backuppc, I have this inside my /etc/sudoers file:
zabbix ALL = (ALL) NOPASSWD: /etc/zabbix/scripts/*
You want to make sure all scripts and the folder are owned by root and permissions are configured for 755 or it could be a security issue. If you don't want to do that, you could also run the job with cron every 5/10 minutes.
use lib "/usr/local/BackupPC/lib";
You need to have sudo configured so this script can be run has backuppc, I have this inside my /etc/sudoers file:
zabbix ALL = (ALL) NOPASSWD: /etc/zabbix/scripts/*
You want to make sure all scripts and the folder are owned by root and permissions are configured for 755 or it could be a security issue. If you don't want to do that, you could also run the job with cron every 5/10 minutes.

Comment