Installing the Zabbix (Monitoring) agent.
RHEL 6.5
<pre>
# Download and install repository package, install keys and add to repolist.
rpm -ivh http://repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/zabbix-release-2.2-1.el6.noarch.rpm
yum install -y zabbix-agent-2.2.4-1.el6.x86_64
# Edit file *.conf file and add following details
sed -i -e "s/Hostname=\(.*\)/Hostname=`hostname|awk -F. '{print $1}'`/g"
sed -i -e "s/Server=\(.*\)/Server=10.0.0.22/g" /etc/zabbix/zabbix_agentd.conf
sed -i -e "s/ServerActive=\(.*\)/ServerActive=10.0.0.22/g" /etc/zabbix/zabbix_agentd.conf
# View the changes that were made to file
grep Hostname= /etc/zabbix/zabbix_agentd.conf
grep Server= /etc/zabbix/zabbix_agentd.conf
grep ServerActive= /etc/zabbix/zabbix_agentd.conf
chkconfig --levels 345 zabbix-agent on
service zabbix-agent restart
</pre>
UBUNTU 12.04
<pre>
# Download and install repository package, install keys and add to repolist.
dpkg -i zabbix-release_2.2-1+precise_all.deb
# As 'root' Comment out the extras sources from /etc/apt/sources.list file
apt-get update
apt-get install zabbix-agent
# Update the rc configs to set the runlevel for zabbix-agent
update-rc.d zabbix-agent start 20 2 3 4 5 . stop 20 0 1 6 .
# Edit file *.conf file and add following details
sed -i -e "s/Hostname=\(.*\)/Hostname=`hostname|awk -F. '{print $1}'`/g"
sed -i -e "s/Server=\(.*\)/Server=10.0.0.22/g" /etc/zabbix/zabbix_agentd.conf
sed -i -e "s/ServerActive=\(.*\)/ServerActive=10.0.0.22/g" /etc/zabbix/zabbix_agentd.conf
# View the changes that were made to file
grep Hostname= /etc/zabbix/zabbix_agentd.conf
grep Server= /etc/zabbix/zabbix_agentd.conf
grep ServerActive= /etc/zabbix/zabbix_agentd.conf
</pre>
UBUNTU 14.04
<pre>
# Download and install repository package, install keys and add to repolist.
dpkg -i zabbix-release_2.2-1+trusty_all.deb
apt-get update
apt-get install zabbix-agent
# Update the rc configs to set the runlevel for zabbix-agent
update-rc.d zabbix-agent start 20 2 3 4 5 . stop 20 0 1 6 .
# Edit file *.conf file and add following details
sed -i -e "s/Hostname=\(.*\)/Hostname=`hostname|awk -F. '{print $1}'`/g"
sed -i -e "s/Server=\(.*\)/Server=10.0.0.22/g" /etc/zabbix/zabbix_agentd.conf
sed -i -e "s/ServerActive=\(.*\)/ServerActive=10.0.0.22/g" /etc/zabbix/zabbix_agentd.conf
# View the changes that were made to file
grep Hostname= /etc/zabbix/zabbix_agentd.conf
grep Server= /etc/zabbix/zabbix_agentd.conf
grep ServerActive= /etc/zabbix/zabbix_agentd.conf
</pre>
WINDOWS 7/8
è Start -> RUN -> type following "command"
***** open commandline as a Admin user
è Add all the new boxes to zabbix
o Download
<pre>
net use N: \\cuda-fs0\installers
mkdir c:\zabbix
xcopy n:\zabbix c:\zabbix /E /Y
</pre>
o Setup the zabbix deamon as service
<pre>
zabbix_agentd.exe --config c:\zabbix\conf\zabbix_agentd.win.conf --install
</pre>
o Adds firewall exception for
§ inbound rules
<pre>
netsh advfirewall firewall add rule localport=10050 protocol=tcp name="Allow zabbix-agent" action=allow dir=in security=notrequired
</pre>
§ outbound rules
<pre> netsh advfirewall firewall add rule localport=10050 protocol=tcp name="Allow zabbix-agent" action=allow dir=out security=notrequired
</pre>
o Start Daemon
net start "zabbix agent"
è Append the configuration file "C:\zabbix\conf\zabbix-agentd.conf"
o Find and replace with following lines (Server/ServerActive=10.0.0.21) without quotes
§ Hostname=eris-w764-buildxx
§ Server=10.0.0.21
§ ServerActive=10.0.0.21
<pre>
hostname.exe > __hostname.txt
set /p host=<__hostname.txt
echo Hostname=%host% >> c:\zabbix\conf\zabbix_agentd.win.conf
echo Server=10.31.97.194 >> c:\zabbix\conf\zabbix_agentd.win.conf
echo ServerActive=10.31.97.194 >> c:\zabbix\conf\zabbix_agentd.win.conf
</pre>
- net use N: /DELETE