updated urbackup client, added systemd monitoring
This commit is contained in:
parent
69ca0e3f9a
commit
db2fcd1f6d
7
assets/zabbix/userparameter_systemd_services.conf
Normal file
7
assets/zabbix/userparameter_systemd_services.conf
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
UserParameter=systemd.service.discovery,service_list=$(systemctl list-unit-files | grep service | grep enabled | awk '{print $1}' | sed -e 's/.service//' | grep -Ev 'getty|autovt');echo -n '{"data":[';for s in ${service_list}; do echo -n "{\"{#SERVICE}\": \"$s\"},";done | sed -e 's:\},$:\}:';echo -n ']}'
|
||||||
|
|
||||||
|
UserParameter=systemd.service.status[*],$(systemctl status $1 2>/dev/null | grep -Ei 'running|active \(exited\)|active \(running\)' > /dev/null) && echo 0 || echo 1
|
||||||
|
|
||||||
|
UserParameter=systemd.service.PID[*],systemctl status $1 2>/dev/null | grep 'Main PID' | cut -f2 -d: | awk '{print $$1}'
|
||||||
|
|
||||||
|
UserParameter=systemd.uptime,cat /proc/uptime | awk '{ print $1 }' | cut -f1 -d.
|
@ -38,12 +38,12 @@ apt install build-essential "g++" "libcrypto++-dev" libz-dev -y
|
|||||||
# libwxgtk3.0-dev
|
# libwxgtk3.0-dev
|
||||||
|
|
||||||
# Download the UrBackup client source files and extract them
|
# Download the UrBackup client source files and extract them
|
||||||
wget -P /tmp/ https://hndl.urbackup.org/Client/latest/urbackup-client-2.2.6.tar.gz
|
wget -P /tmp/ https://hndl.urbackup.org/Client/latest/urbackup-client-2.3.4.0.tar.gz
|
||||||
cd /tmp
|
cd /tmp
|
||||||
tar xzf /tmp/urbackup-client-2.2.6.tar.gz
|
tar xzf /tmp/urbackup-client-2.3.4.0.tar.gz
|
||||||
|
|
||||||
# Build the UrBackup client and install it
|
# Build the UrBackup client and install it
|
||||||
cd /tmp/urbackup-client-2.2.6.0
|
cd /tmp/urbackup-client-2.3.4.0
|
||||||
./configure --enable-headless
|
./configure --enable-headless
|
||||||
make -j4
|
make -j4
|
||||||
make install
|
make install
|
||||||
@ -65,7 +65,7 @@ internet_authkey=$_authkey
|
|||||||
internet_mode_enabled=true
|
internet_mode_enabled=true
|
||||||
internet_image_backups_def=false
|
internet_image_backups_def=false
|
||||||
default_dirs_def=/etc;var/www;/var/backups/mysql
|
default_dirs_def=/etc;var/www;/var/backups/mysql
|
||||||
tartup_backup_delay=3
|
startup_backup_delay_def=3
|
||||||
computername=$_computername" > /usr/local/var/urbackup/data/settings.cfg
|
computername=$_computername" > /usr/local/var/urbackup/data/settings.cfg
|
||||||
|
|
||||||
# firewall
|
# firewall
|
||||||
|
@ -93,6 +93,9 @@ if [ "$yn" = "Y" ] || [ "$yn" = "y" ]; then
|
|||||||
cp "$_assets"/zabbix/proxmox-ct.conf "$_agent_conf_d"/
|
cp "$_assets"/zabbix/proxmox-ct.conf "$_agent_conf_d"/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# SYSTEMD
|
||||||
|
cp "$_assets"/zabbix/userparameter_systemd_services.conf "$_agent_conf_d"/
|
||||||
|
|
||||||
# TODO add modules path to agent ??
|
# TODO add modules path to agent ??
|
||||||
|
|
||||||
# allow comm. port with zabbix-server
|
# allow comm. port with zabbix-server
|
||||||
|
Loading…
x
Reference in New Issue
Block a user