I created an install script to make deplyment of the zabbix client on servers very easy, it is as fallows:
#!/bin/bash
mkdir /etc/zabbix
useradd zabbix
passwd zabbix -l
cd /etc/zabbix
wget http://youdb.com/files/zabbix/zabbix_agentd
wget http://youdb.com/files/zabbix/conf/zabbix_agentd.conf
chown -R zabbix:zabbix /etc/zabbix
cd /etc/init.d/
wget http://youdb.com/files/zabbix/init.d...bix_agentd_ctl
echo "zabbix ALL=(ALL) NOPASSWD: /etc/init.d/*" >> \n /etc/sudoers
hostname > /tmp/hostname
sed -i "s/\./_/g" /tmp/hostname
export HOST=`cat /tmp/hostname`
echo $HOST
sed -i "s/Hostname=ZABBIX/Hostname=$HOST/" /etc/zabbix/zabbix_agentd.conf
chmod +x /etc/init.d/zabbix_agentd_ctl
chmod +x /etc/zabbix/zabbix_agentd
/etc/init.d/zabbix_agentd_ctl restart
My question is, Is it possible to have the zabbix server automatically add hosts which send data to it ?
#!/bin/bash
mkdir /etc/zabbix
useradd zabbix
passwd zabbix -l
cd /etc/zabbix
wget http://youdb.com/files/zabbix/zabbix_agentd
wget http://youdb.com/files/zabbix/conf/zabbix_agentd.conf
chown -R zabbix:zabbix /etc/zabbix
cd /etc/init.d/
wget http://youdb.com/files/zabbix/init.d...bix_agentd_ctl
echo "zabbix ALL=(ALL) NOPASSWD: /etc/init.d/*" >> \n /etc/sudoers
hostname > /tmp/hostname
sed -i "s/\./_/g" /tmp/hostname
export HOST=`cat /tmp/hostname`
echo $HOST
sed -i "s/Hostname=ZABBIX/Hostname=$HOST/" /etc/zabbix/zabbix_agentd.conf
chmod +x /etc/init.d/zabbix_agentd_ctl
chmod +x /etc/zabbix/zabbix_agentd
/etc/init.d/zabbix_agentd_ctl restart
My question is, Is it possible to have the zabbix server automatically add hosts which send data to it ?
Comment