Debian 10 Üzerine Zabbix Agent Kurulumu

Bu bash script Zabbix Agent kurulumu içindir, 1.1.1.1 IP adresini zabbit sunucunuzun IP adresi ile değiştirmeyi unutmayınız.

#!/bin/bash -e

if [ "$UID" -ne 0 ]; then
  echo "Please run as root"
  exit 1
fi

# Only run it if we can (ie. on Ubuntu/Debian)
if [ -x /usr/bin/apt-get ]; then
  apt-get update
  apt-get -y install zabbix-agent sysv-rc-conf
  sysv-rc-conf zabbix-agent on
  sed -i 's/Server=127.0.0.1/Server=1.1.1.1/' /etc/zabbix/zabbix_agentd.conf
  sed -i 's/ServerActive=127.0.0.1/ServerActive=1.1.1.1/' /etc/zabbix/zabbix_agentd.conf
  HOSTNAME=`hostname` && sed -i "s/Hostname=Zabbix\ server/Hostname=$HOSTNAME/" /etc/zabbix/zabbix_agentd.conf
  service zabbix-agent restart
fi

Sistem Uzmanı, Linux Hacısı, El-Kernel

Yorum yapın