Install Zabbix Agent on Synology
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:
1 | 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
5 | DS> ./configure -- enable -agent --prefix=/opt/zabbix |
The compiler starts running for a few minutes and shows this error:
2 | checking for ICONV support... no |
3 | configure: error: Unable to find iconv.h "no" |
Let’s see if the named file is on your system
1 | DS> find / -name iconv.h |
2 | /volume1/@optware/include/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
2 | DS> ln -s /opt/include/ include |
Now start recompiling, you’ll see no more errors.
2 | DS> ./configure -- enable -agent --prefix=/opt/zabbix |
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:
1 | PidFile=/tmp/zabbix_agentd.pid |
2 | LogFile=/opt/zabbix/agentd.log |
4 | Hostname=synology.domain.tld |
Tidak ada komentar:
Posting Komentar