updates
This commit is contained in:
@@ -2,11 +2,21 @@
|
||||
|
||||
# installs the zabbix agent and configures it
|
||||
|
||||
DEBIAN_URL = "https://repo.zabbix.com/zabbix/3.5/debian/pool/main/z/zabbix-release/zabbix-release_3.5-1%2Bstretch_all.deb"
|
||||
CENTOS_URL = "https://repo.zabbix.com/zabbix/3.5/rhel/7/x86_64/zabbix-release-3.5-1.el7.noarch.rpm"
|
||||
UBUNTU_URL = "https://repo.zabbix.com/zabbix/3.5/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.5-1%2Bbionic_all.deb"
|
||||
# create temp directory for downloaded files
|
||||
DIRECTORY="/tmp/zabbix_install"
|
||||
mkdir ${DIRECTORY}
|
||||
|
||||
ZABBIX_SERVER = "gauntzabbix.home.johnhgaunt.com"
|
||||
# download the correct file for the correct OS
|
||||
FILENAME="zabbix_repo.deb"
|
||||
DEBIAN_URL="https://repo.zabbix.com/zabbix/3.5/debian/pool/main/z/zabbix-release/zabbix-release_3.5-1%2Bstretch_all.deb"
|
||||
#CENTOS_URL="https://repo.zabbix.com/zabbix/3.5/rhel/7/x86_64/zabbix-release-3.5-1.el7.noarch.rpm"
|
||||
#UBUNTU_URL="https://repo.zabbix.com/zabbix/3.5/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.5-1%2Bbionic_all.deb"
|
||||
wget --output-document=${DIRECTORY}/${FILENAME} $DEBIAN_URL
|
||||
|
||||
# install the repo
|
||||
dpkg -i ${DIRECTORY}/${FILENAME}
|
||||
|
||||
ZABBIX_SERVER="gauntzabbix.home.johnhgaunt.com"
|
||||
|
||||
# update the cache
|
||||
apt update
|
||||
@@ -15,7 +25,7 @@ apt update
|
||||
apt install zabbix-agent
|
||||
|
||||
# ask for the hostname
|
||||
read -p 'Hostname: ' hostname
|
||||
read -e -p "Enter Hostname: " -i "$(cat /etc/hostname)" hostname
|
||||
|
||||
sed -i 's/Hostname=Zabbix\ server/Hostname=${hostname}/' /etc/zabbix/zabbix_agentd.conf
|
||||
|
||||
@@ -25,4 +35,4 @@ sed -i 's/ServerActive=127.0.0.1/ServerActive=${ZABBIX_SERVER}/' /etc/zabbix/zab
|
||||
|
||||
systemctl restart zabbix-agent
|
||||
|
||||
systemctl enable zabbix-agent
|
||||
systemctl enable zabbix-agent
|
||||
Reference in New Issue
Block a user