* Initial import
This commit is contained in:
parent
52affd48ce
commit
24e71fb9cc
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
*.deb
|
14
README.md
14
README.md
@ -4,19 +4,23 @@ This is based on script found in thread https://www.zabbix.com/forum/showthread.
|
|||||||
|
|
||||||
Tested with Zabbix 4.0 (http://www.zabbix.com/) and Backuppc v3 (http://backuppc.sourceforge.net/).
|
Tested with Zabbix 4.0 (http://www.zabbix.com/) and Backuppc v3 (http://backuppc.sourceforge.net/).
|
||||||
|
|
||||||
## Install
|
## Debian Package Build
|
||||||
|
fakeroot dpkg-deb --build src/ .
|
||||||
|
|
||||||
|
|
||||||
|
## Manual Install
|
||||||
|
|
||||||
Add a line from 'sudo' file to your sudo config
|
Add a line from 'sudo' file to your sudo config
|
||||||
|
|
||||||
cp etc/sudoers.d/zabbix-backuppc /etc/sudoers.d/zabbix-backuppc
|
cp etc/sudoers.d/zabbix-backuppc /etc/sudoers.d/zabbix-backuppc
|
||||||
|
|
||||||
Copy 'zabbix-backuppc.pl' and 'zabbix-discover-backuppc.pl' to '/usr/local/bin'
|
Copy 'zabbix-backuppc.pl' and 'zabbix-discover-backuppc.pl' to '/usr/bin'
|
||||||
|
|
||||||
cp usr/local/bin/*.pl /usr/local/bin
|
cp usr/bin/*.pl /usr/bin
|
||||||
|
|
||||||
Make it executable with backuppc user
|
Make it executable with backuppc user
|
||||||
|
|
||||||
chmod +x /usr/local/bin/*.pl
|
chmod +x /usr/bin/*.pl
|
||||||
|
|
||||||
You need to have in Zabbix agent config
|
You need to have in Zabbix agent config
|
||||||
|
|
||||||
@ -87,7 +91,7 @@ Information about the BackupPc itself.
|
|||||||
|
|
||||||
Discovery from individual backups
|
Discovery from individual backups
|
||||||
|
|
||||||
system.run["sudo -u backuppc /usr/local/bin/zabbix-discover-backuppc.pl"]
|
system.run["sudo -u backuppc /usr/bin/zabbix-discover-backuppc.pl"]
|
||||||
|
|
||||||
#### Items
|
#### Items
|
||||||
|
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
zabbix ALL = (ALL) NOPASSWD: /usr/local/bin/zabbix-backuppc.pl,/usr/local/bin/zabbix-discover-backuppc.pl
|
|
||||||
|
|
1
src/DEBIAN/conffiles
Normal file
1
src/DEBIAN/conffiles
Normal file
@ -0,0 +1 @@
|
|||||||
|
/etc/sudoers.d/zabbix_backuppc
|
10
src/DEBIAN/control
Normal file
10
src/DEBIAN/control
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
Package: zabbix-backuppc
|
||||||
|
Version: 1.0.0-2019071103
|
||||||
|
Section: net
|
||||||
|
Priority: optional
|
||||||
|
Architecture: all
|
||||||
|
Depends: zabbix-agent (>=4.0), zabbix-sender (>=4.0)
|
||||||
|
Maintainer: Gabriele Vivinetto <gabriele.mailing@rvmgroup.it>
|
||||||
|
Description: Zabbiz agent scripts to monitor BackupPC
|
||||||
|
These scripts monitor a BackupPC server
|
||||||
|
|
41
src/DEBIAN/postinst
Executable file
41
src/DEBIAN/postinst
Executable file
@ -0,0 +1,41 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# postinst script for tcng-config
|
||||||
|
#
|
||||||
|
# see: dh_installdeb(1)
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# summary of how this script can be called:
|
||||||
|
# * <postinst> `configure' <most-recently-configured-version>
|
||||||
|
# * <old-postinst> `abort-upgrade' <new version>
|
||||||
|
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
|
||||||
|
# <new-version>
|
||||||
|
# * <postinst> `abort-remove'
|
||||||
|
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
|
||||||
|
# <failed-install-package> <version> `removing'
|
||||||
|
# <conflicting-package> <version>
|
||||||
|
# for details, see http://www.debian.org/doc/debian-policy/ or
|
||||||
|
# the debian-policy package
|
||||||
|
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
configure)
|
||||||
|
/bin/sed -i -e 's/# EnableRemoteCommands=0/EnableRemoteCommands=1/' /etc/zabbix/zabbix_agentd.conf
|
||||||
|
/usr/sbin/service zabbix-agent restart
|
||||||
|
;;
|
||||||
|
|
||||||
|
abort-upgrade|abort-remove|abort-deconfigure)
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo "postinst called with unknown argument \`$1'" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# dh_installdeb will replace this with shell code automatically
|
||||||
|
# generated by other debhelper scripts.
|
||||||
|
|
||||||
|
#DEBHELPER#
|
||||||
|
|
||||||
|
exit 0
|
2
src/etc/sudoers.d/zabbix_backuppc
Normal file
2
src/etc/sudoers.d/zabbix_backuppc
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
zabbix ALL = (ALL) NOPASSWD: /usr/bin/zabbix-backuppc.pl,/usr/bin/zabbix-discover-backuppc.pl
|
||||||
|
|
@ -2224,7 +2224,7 @@
|
|||||||
<type>7</type>
|
<type>7</type>
|
||||||
<snmp_community/>
|
<snmp_community/>
|
||||||
<snmp_oid/>
|
<snmp_oid/>
|
||||||
<key>system.run["sudo -u backuppc /usr/local/bin/zabbix-backuppc.pl"]</key>
|
<key>system.run["sudo -u backuppc /usr/bin/zabbix-backuppc.pl"]</key>
|
||||||
<delay>300</delay>
|
<delay>300</delay>
|
||||||
<history>90d</history>
|
<history>90d</history>
|
||||||
<trends>365d</trends>
|
<trends>365d</trends>
|
||||||
|
Loading…
Reference in New Issue
Block a user