Setting up Zabbix on Fedora Core 5

Zabbix LogoJust been looking into a replacement systems monitoring box for work. It seems that Zabbix is the most professional. ZenOSS looked good, but requires Python to be installed on the Windows Server clients in order to run the monitoring client. We’re currently running a combination of Hobbit, Cacti, Syslog-NG logging to a MySQL database, and PHPSyslog-NG. I’m trying to determine if Zabbix is a viable alternative to Hobbit.

ZABBIX is all-in-one 24×7 monitoring solution without high cost.

ZABBIX is software for monitoring of your applications, network and servers. ZABBIX supports both polling and trapping techniques to collect data from monitored hosts. A flexible notification mechanism allows easy and quickly configure different types of notifications for pre-defined events.

Here is a tutorial created from the notes I took while setting Zabbix up on a virtual machine.

This assumes that you’ve got apache & mysql installed and running on your Fedora Core box. Also, you either need to be able to manually create users in mysql and modify database permissions, or have PHPMyAdmin installed. Refer to my other guides about this.

  • Create a user to run the Zabbix services
  • Create a directory to store Zabbix in
  • Download Zabbix to the linux box, extract it, move it to the right place, fix the permissions
shell> useradd zabbix
shell> cd /home/zabbix
shell> wget
shell> tar -zxvf zabbix-1.1.3.tar.gz
shell> mv zabbix-1.1.3/* ./
shell> rm -rf zabbix-1.1.3
shell> rm -f zabbix-1.1.3.tar.gz
shell> chown -R zabbix.zabbix /home/zabbix/

This next part was taken from the Zabbix install guide (

What it does is:

  • Creates a database called ‘zabbix’
  • Populates the database with entries as per the following SQL files
    • schema.sql
    • data.sql
    • images.sql
shell> mysql -u -p
mysql> create database zabbix;
mysql> quit;
shell> cd /home/zabbix/create/mysql
shell> cat schema.sql |mysql -u -p zabbix
shell> cd ../data
shell> cat data.sql |mysql -u -p zabbix
shell> cat images.sql |mysql -u -p zabbix

This next part is just installing the prerequisites for Zabbix:

shell> yum install -y net-snmp

shell> yum install -y net-snmp-devel
shell> yum install -y mysql-devel
shell> yum install -y php-gd
shell> yum install -y fping 

This next part configures & compiles Zabbix.

shell> cd /home/zabbix
shell> ./configure --enable-server --enable-agent --with-mysql --with-net-snmp
shell> make clean && make install

Now we will configure the Zabbix services to start when the machine starts up.

shell> mkdir /etc/zabbix
shell> cp /home/zabbix/misc/conf/* /etc/zabbix
shell> cp /home/zabbix/misc/init.d/fedora/core5/zabbix_server /etc/init.d
shell> cp /home/zabbix/misc/init.d/fedora/core/zabbix_agentd /etc/init.d

Now we have to edit /etc/init.d/zabbix_server & /etc/init.d/zabbix_agentd to point to the correct location for the binaries Start the services:

shell> service zabbix_server start
shell> service zabbix_agentd start

Now it’s time to create a mysql user with a secure password, and give it full access only to the ‘zabbix’ database. The easiest way to do this is in PHPMyAdmin.

Once that’s done, we need to modify /home/zabbix/frontends/php/include/ and specify the database username and password.

Next, we need to configure what Microsoft would call a ‘virtual directory’ in Apache. This just points Apache to the path of the Zabbix web interface files. This is done in /etc/httpd/conf.d/. You can either create your own, or download mine and rename the extension to .conf

shell> cd /etc/httpd/conf.d wget
shell> mv zabbixconf.txt zabbix.conf
shell> service httpd restart

You should now be able to browse to http://serverip/zabbix and get the login screen: Zabbix. First screen we see when browsing to the URL

I may put together an article on monitoring Windows servers with Zabbix once I get around to testing it out. Haven’t had a chance yet. Happy Zabbix’ing, Daniel

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s