Installer l'agent zabbix sur OpenFiler

Source: https://forums.openfiler.com/viewtopic.php?pid=17680#17680

Sur une machine de dev (clone virtuel par exemple) installer les dépendances:

conary update conary-build
conary update gcc:devel
conary update gcc:lib
conary update gcc:runtime
conary update binutils;devellib
conary update debugedit:runtime
conary update elfutils:runtime
conary update flex:runtime
conary update gettext:runtime
conary update glib:devel
conary update glibc:devel
conary update glibc:devellib
conary update install-info:runtime
conary update libgcc:devellib
conary update patch:runtime
conary update pkgconfig:devel
conary update zlib:devel

Télécharger la dernière version de zabbix

mkdir localdev
cd localdev
wget http://downloads.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/1.6.6/zabbix-1.6.6.tar.gz?use_mirror=freefr
tar xvzf zabbix-1.6.6.tar.gz
cd zabbix-1.6.6

Préparer la compilation de l'agent

./configure --enable-agent
make

Copier le répertoire sur le vrai serveur et installer

mkdir -p /var/run/zabbix/
mkdir -p /var/lib/zabbix/
useradd -c "Zabbix Monitoring System" \
-s /sbin/nologin -r -d /var/lib/zabbix zabbix
sed -e 's|/opt/zabbix|/usr/local|g' \
-e 's|/var/tmp/zabbix_agentd.pid|/var/run/zabbix/zabbix_agentd.pid|g' \
-e 's|ZABBIX_AGENTD=.*|ZABBIX_AGENTD="$BASEDIR/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf"|g' \
misc/init.d/redhat/zabbix_agentd_ctl > /etc/rc.d/init.d/zabbix-agent
chmod 755 /etc/rc.d/init.d/zabbix-agent
ln -s /etc/rc.d/init.d/zabbix-agent /etc/rc3.d/S99zabbix-agent
ln -s /etc/rc.d/init.d/zabbix-agent /etc/rc6.d/K10zabbix-agent
mkdir -p /etc/zabbix
wget --no-check-certificate {} -O /etc/rc.d/init.d/zabbix-agent
cp src/zabbix_agent/{zabbix_agent,zabbix_agentd} /usr/local/sbin/
chmod 755 /usr/local/sbin/zabbix_agent*
mkdir -p /var/log/zabbix/

Ressource: Script d'initialisation

Configurer l'agent et tester