updated zabbix
This commit is contained in:
parent
8ecaf8d78a
commit
300402a38f
@ -26,12 +26,9 @@ if [ ! -d "$_assets" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# not necessary anymore zabbix-agent 4 is in apt
|
||||
# https://packages.debian.org/fr/buster/zabbix-agent
|
||||
# TODO downgrade zabbix-agent to 3.4
|
||||
|
||||
wget -P /tmp/ http://repo.zabbix.com/zabbix/3.4/debian/pool/main/z/zabbix-release/zabbix-release_3.4-1+stretch_all.deb
|
||||
dpkg -i /tmp/zabbix-release_3.4-1+stretch_all.deb
|
||||
wget -P /tmp/ wget https://repo.zabbix.com/zabbix/6.4/debian/pool/main/z/zabbix-release/zabbix-release_6.4-1+debian11_all.deb
|
||||
dpkg -i /tmp/zabbix-release_6.4-1+debian11_all.deb
|
||||
|
||||
apt-get update -y
|
||||
|
||||
@ -57,6 +54,10 @@ sed -i "s#Server=127.0.0.1#Server=$_ip#g" /etc/zabbix/zabbix_agentd.conf
|
||||
sed -i "s#ServerActive=127.0.0.1#ServerActive=$_ip#g" /etc/zabbix/zabbix_agentd.conf
|
||||
sed -i "s#Hostname=Zabbix server#Hostname=$_host_name#g" /etc/zabbix/zabbix_agentd.conf
|
||||
|
||||
|
||||
# todo ask if LXC container, if yes install this script
|
||||
# https://github.com/kvaps/zabbix-linux-container-template
|
||||
|
||||
# APT
|
||||
# check for debian security updates
|
||||
# not working : https://www.osso.nl/blog/zabbix-counting-security-updates
|
||||
|
@ -0,0 +1,4 @@
|
||||
UserParameter=ct.memory.size[*],free -b | awk 'NR==2 {total=$ 2; used=($ 3+$ 5); pused=(($ 3+$ 5)*100/$ 2); free=$ 4; pfree=($ 4*100/$ 2); shared=$ 5; buffers=$ 6; cached=$ 6; available=$ 7; pavailable=($ 7*100/$ 2); if("$1" == "") {printf("%.0f", total )} else {printf("%.0f", $1 "" )} }'
|
||||
UserParameter=ct.swap.size[*],free -b | awk 'NR==3 {total=$ 2; used=$ 3; free=$ 4; pfree=($ 4*100/$ 2); pused=($ 3*100/$ 2); if("$1" == "") {printf("%.0f", free )} else {printf("%.0f", $1 "" )} }'
|
||||
UserParameter=ct.cpu.load[*],cut -d" " -f1-3 /proc/loadavg | awk -F'[, ]+' '{avg1=$(NF-2); avg5=$(NF-1); avg15=$(NF)}{print $2/'$(nproc)'}'
|
||||
UserParameter=ct.uptime,cut -d"." -f1 /proc/uptime
|
Loading…
x
Reference in New Issue
Block a user