Weitere ähnliche Inhalte
Ähnlich wie Nas4 freeへzabbix agentを導入してみた (20)
Nas4 freeへzabbix agentを導入してみた
- 10. Zabbix Agentの導入
# wget http://downloads.sourceforge.
net/project/zabbix/ZABBIX%20Latest%20Stable/2.0.7
/zabbix-2.0.7.tar.gz
wget: Command not found.
なら、wgetを導入すればということでやってみたところ・・・
/: write failed, filesystem is full
- 12. というわけで直接Zabbix Agentのインストールを実
施。
# pkg_add -r zabbix2-agent
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9.1-
release/Latest/zabbix2-agent.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9.1-
release/All/libiconv-1.14.tbz... Done.
===> Creating users and/or groups.
Creating group 'zabbix' with gid '122'.
Creating user 'zabbix' with uid '122'.
今度は成功。
- 19. #!/bin/sh
# Valiable
ZBX_CONF=/usr/local/etc/zabbix2/zabbix_agentd.conf
ZBX_RC=/usr/local/etc/rc.d
ZABBIX_SERVER_IP=""
SERVER_NAME=""
# add Zabbix-agent
/usr/sbin/pkg_add -r zabbix2-agent
# copy configure
/bin/cp ${ZBX_CONF}.sample ${ZBX_CONF}
# Value reWritable
sed -i '' -e 's/Server=127.0.0.1/Server='${ZABBIX_SERVER_IP}'/' ${ZBX_CONF}
sed -i '' -e 's/ServerActive=127.0.0.1/ServerActive='${ZABBIX_SERVER_IP}'/' ${ZBX_CONF}
sed -i '' -e 's/Hostname=Zabbix server/Hostname='${SERVER_NAME}'/' ${ZBX_CONF}
sed -i '' -e 's/# EnableRemoteCommands=0/EnableRemoteCommands=1/' ${ZBX_CONF}
# auto start config
echo "zabbix_agentd_enable="YES"" >> /etc/rc.conf
# Zabbix agent start
${ZBX_RC}/zabbix_agentd start