See www.zabbix.com for the official Zabbix site.

Install on FreeNAS

From Zabbix.org
Jump to: navigation, search

Install agent on FreeNAS

On the freenas box web interface

  • under services - ssh configure to allow root ssh
  • create a dataset under main vol called Zabbix
  • Create a new user called zabbix
    • Home Directory: /nonexistant
    • Shell: nologin
    • Disable password login: checked

under System - init/shutdown scripts

first one:

cp /mnt/v002/Zabbix/zabbix_agentd.conf /usr/local/etc/

type: post init

second one:

/usr/local/sbin/zabbix_agentd

type: post init

ssh to freenas

Remount root as RW temporarily

ssh root@<yourFreeNAS>
mount -uw /

on remote ws

Download the package Here

extract the package which has /user as the root directory

edit the conf in /usr/local/etc/zabbix_agentd.conf then:

scp /home/<yourdirectory>/usr/local/sbin/zabbix_agentd root@<yourFreeNAS>:/usr/local/sbin/

and

scp /home/<yourdirectory>/usr/local/etc/zabbix_agentd.conf root@<yourFreeNAS>:/mnt/<your main vol>/Zabbix/

on the freenas box

vi /conf/base/etc/rc.local

Save it. Then:

cp /mnt/<your main vol>/Zabbix/zabbix_agentd.conf /usr/local/etc/

and

/usr/local/sbin/zabbix_agentd

and

mount -uw /

May want to:

  • under services - ssh configure to not allow root ssh

With FreeNAS 11 you'll need to create two symlinks to start the Zabbix Agent:

Post install, the Zabbix agent probably won't start on FreeNAS 11. To fix, open a shell session on FreeNAS and create two symlinks:

ln -s /lib/libkvm.so.7 /lib/libkvm.so.5
ln -s /usr/local/lib/libiconv.so.2 /usr/local/lib/libiconv.so.3

Then you should be able to start the Zabbix Agent

The Zabbix Template is on this Wiki File:Template OS FreeNAS.xml