Zabbix

User Rating: 5 / 5

Star ActiveStar ActiveStar ActiveStar ActiveStar Active
 

 

Stop/ Start Agent

/etc/init.d/zabbix-agent stop | start

systemctl stop | start zabbix-agent

FreeBSD: sudo su -
FreeBSD: ps ax | grep zabbix
FreeBSD: kill -9 12345 12345 12345
FreeBSD: /home/zabbix/sbin/zabbix_agentd -c /home/zabbix/sbin/zabbix_agentd.conf Start

Win: net start "zabbix agent"

If hangs-up

killall -TERM zabbix_agentd
PidFile=/var/run/zabbix/zabbix_agentd.pid

If exist and version

rpm -qa |grep zabbix

Install on RHEL6

scp -r /work/install/linux/Zabbix/zabbix-2.4.7-1.el6.x86_64.rpm  root@:/opt

scp -r /work/install/linux/Zabbix/zabbix-agent-2.4.7-1.el6.x86_64.rpm root@:/opt

cd /opt/
rpm -i zabbix-2.4.7-1.el6.x86_64.rpm
rpm -i zabbix-agent-2.4.7-1.el6.x86_64.rpm

Win

zabbix_agentd.exe --config "C:\Program Files\zabbix_agents_2.4.4.win\conf\zabbix_agentd"  --install
zabbix_agentd.exe --uninstall
zabbix_agentd.exe --config "C:\Program Files\zabbix_agents_2.4.4.win\conf\zabbix_agentd"  --uninstall
HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services

Win: C:\Program Files\zabbix_agents_2.4.4.win\bin\win64\zabbix_agentd.exe -c "C:\Program Files\zabbix_agents_2.4.4.win\conf\zabbix_agentd.conf" -i

Settings

vi /etc/zabbix/zabbix_agentd.conf

Hostmane=servername 
Server=172.33.77.88

server name where we install zabbix client
172.33.77.88 - our zabbix server, logs collector

Win: vi C:\Program Files\zabbix_agents_2.4.4.win\conf\zabbix_agentd

Check server connection

telnet 172.33.77.88 10050

Restart script (insert one of two for you)

vi /etc/zabbix/restart_zabbix.sh

# use for RHEL7
RESTART="systemctl start zabbix-agent"
PGREP="/usr/bin/pgrep"
ZABBIX="zabbix_agentd"
$PGREP ${ZABBIX}
if [ $? -ne 0 ]
then
 $RESTART
fi

# use for RHEL6
RESTART="/etc/init.d/zabbix-agent restart"
PGREP="/usr/bin/pgrep"
ZABBIX="zabbix_agentd"
$PGREP ${ZABBIX}
if [ $? -ne 0 ]
then
 $RESTART
fi

chmod 775 /etc/zabbix/restart_zabbix.sh

su -
crontab -e
0 */1 * * * /etc/zabbix/restart_zabbix.sh

. /etc/zabbix/restart_zabbix.sh                   run manually

Logs

cat /var/log/zabbix/zabbix_agentd.log
cat /tmp/zabbix_agentd.log

cat /etc/hosts

Newsletter

Enter your email to join our mailing list

Quick Contact