Ссылка для скачивания:
wget https://www.zabbix.com/downloads/4.4.8/zabbix_agent-4.4.8-linux-3.0-amd64-static.tar.gz
tar xzf zabbix_agent-4.4.8-linux-3.0-amd64-static.tar.gz
Конфигурационный файл:
ash-4.3# grep -Ev '^\s*(;|#|$)' zabbix_agentd.conf LogFile=/tmp/zabbix_agentd.log Server=192.168.1.1 ServerActive=127.0.0.1 AllowRoot=1 User=root |
Файл для запуска демона:
cat /usr/local/etc/rc.d/zabbix_agentd.sh #!/bin/sh # author: Konstantin Kruglov # email: kruglovk@gmail.com # www: k0st1an.blogspot.com # description: init script for use on synology devices # version: 0.1, 07/24/2012 # usage: # cp zabbix_agend.sh /usr/local/etc/rc.d/ # chmod +x /usr/local/etc/rc.d/zabbix_agend.sh ######################################################## ConfFile="/usr/local/etc/zabbix/zabbix_agentd.conf" if [ -e ${ConfFile} ]; then if [ -r ${ConfFile} ]; then source ${ConfFile} else echo "Config file (${ConfFile}: problem read)" exit 1 fi else echo "Config file (${ConfFile} not found)" exit 1 fi Status=`pidof zabbix_agentd > /dev/null && echo $?` case "$1" in start) echo -n "Start zabbix_agentd..." if [ -z "${Status}" ]; then /usr/local/sbin/zabbix_agentd -c ${ConfFile} if [ "${?}" = "0" ]; then sleep 1 echo " ok" exit 0 else sleep 1 echo " false" exit 1 fi else echo "Zabbix already run" exit 1; fi ;; stop) echo -n "Stop zabbix_agentd..." if [ -z ${Status} ]; then echo " not runing" exit 1 fi if [ -e "${PidFile}" ]; then kill `cat ${PidFile}` if [ "${?}" = "0" ]; then sleep 1 echo " ok" exit 0 else sleep 1 echo " false" exit 1 fi fi ;; status) echo -n "Status zabbix_agentd..." if [ -z ${Status} ]; then echo " not runing" else echo " runing" fi exit 0 ;; *) echo "Usage: ${0} {start|stop|status}" exit 1 ;; esac |