Usage of ./backuppc_exporter:
-config-dir string
Path to directory BackupPC configuration config.pl (default "/etc/backuppc")
-data-dir string
Path to directory with pc, cpool and pool directories (default "/var/lib/backuppc")
-listen-address string
The address to listen on for HTTP requests. (default ":8080")
-refresh-interval int
Metric refresh interval in seconds (default 60)
git clone [email protected]:otwieracz/backuppc_exporter.git
cd backuppc_exporter
go get -u github.com/prometheus/client_golang/prometheus
go build -o build/backuppc_exporter # or GOOS=freebsd gobuild when cross-compiling for FreeBSD
backuppc_exporter to /usr/local/bin on target server.systemd:
dist/backuppc_exporter.service to target server as /etc/systemd/system/backuppc_exporter.servicesystemctl daemon-reloadsystemctl enable backuppc_exportersystemctl start backuppc_exporterupstart:
dist/backuppc_exporter.upstart to target server as /etc/init.d/backuppc_exporterupdate-rc.d backuppc_exporter defaultsupdate-rc.d backuppc_exporter enableservice backuppc_exporter startdist/backuppc_exporter.freebsd to target server as /usr/local/etc/rc.d/backuppc_exporter/etc/rc.conf set backuppc_exporter_enabled="YES"service backuppc_exporter startHas to be running as backuppc user in order to access BackupPC CGI interface.
golang metricsbackuppc_last_age# HELP backuppc_last_age Age of most recent backup for every host, in seconds.
# TYPE backuppc_last_age gauge
backuppc_last_age{hostname="alpha"} 347076
backuppc_last_age{hostname="beta"} 325476
backuppc_last_age{hostname="gamma"} 325472
backuppc_pool_usage# HELP backuppc_pool_usage BackupPC pool usage (0 to 1)
# TYPE backuppc_pool_usage gauge
backuppc_pool_usage 0.44
Tested on:
FreeBSD backuppc 11.2-STABLE FreeBSD 11.2-STABLE #0 r325575+dac72894653(freenas/11-stable): Sun Sep 9 19:34:18 EDT 2018 [email protected]:/freenas-11.2-releng/freenas/_BE/objs/freenas-11.2-releng/freenas/_BE/os/sys/FreeNAS.amd64 amd64Linux backupm2 3.16.0-31-generic #41~14.04.1-Ubuntu SMP Wed Feb 11 19:30:13 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux (upstart)Content type
Image
Digest
Size
9 MB
Last updated
about 7 years ago
docker pull hypery2k/backuppc_exporter