Since a few  months I use a Synology DS211 NAS device at home, to store my music, movies and back-ups. I also use Zabbix to monitor my servers, switches, etc. Since there is a Zabbix agent package for most Linux distributions, there was none for the Synology. But… Synology is Linux so let’s rock and compile them from source.

I assume that my readers are hard-core System Administrators who know how to enable SSH access and become root. The next thing to do is slipstream your Synology and install the ipkg package-manager. Now, install some build tools with the command:

DS> ipkg install gcc make bison flex gconv-modules

Let’s get the Zabbix source, in my case 1.9.3-beta, untar them and start compiling

DS> cd /root
DS> wget
DS> tar xzf zabbix-*
DS> cd zabbix-*
DS> ./configure --enable-agent --prefix=/opt/zabbix

The compiler starts running for a few minutes and shows this error:

checking for ICONV support... no
configure: error: Unable to find iconv.h "no"

Let’s see if the named file is on your system

DS> find / -name iconv.h

The Zabbix configure script will look for the iconv.h file in /usr/include, not in /opt/include. Setting a symlink will fix this

DS> cd /usr/
DS> ln -s /opt/include/ include

Now start recompiling, you’ll see no more errors.

DS> cd /root/zabbix-*
DS> ./configure --enable-agent --prefix=/opt/zabbix
DS> make
DS> make install

Only thing left is creating configuration files and a init-script and a sample configuration file. Start Zabbix with from an SSH shell with “/opt/zabbix/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf &”

An sample /etc/zabbix/zabbix_agentd.conf:

Server= # Your Zabbix Server IP