Zabbix on Ubuntu 7.10 (Gutsy) Server

A simple walk-through of installing a Zabbix monitoring server on Ubuntu 7.10 server.

Choosing a monitoring system

I've been meaning to upgrade the level of monitoring I do for Admoda. So, I've been looking at monitoring software over the last couple of days. I narrowed down the options to Nagios plus some extras (possibly Groundwork), or Zabbix.

In the end, I decided to go with Zabbix, mainly because a client uses it too, so I'll probably end up writing some custom tests for them.

Zabbix is a fully-featured monitoring system, and it's quite easy, once you get a grasp of the concepts, to do some powerful monitoring. It will also draw graphs showing you how values vary over time,

In this post, I'll go through the (very simple) steps required to install Zabbix on Ubuntu 7.10 server (Gutsy Gibbon).

I did try to install Zabbix 1.4.2 via macports on my Macbook Pro and, although the installation seemed to be successful, I found that none of the popups on the web interface came up. Rather than spend the time to track down the problem and fix it, I decided to go for a clean install on Ubuntu, because I won't be using my Mac as the zabbix server anyway.

In my case, I'm installing on a new virtual machine under VMWare Fusion. Later on, I will move the whole virtual server to my main server, and leave it running there. But, for now, it's easier to do everything on my mac.

Installing on Ubuntu 7.10 server

So, step one is to do a clean install of Ubuntu 7.10 server. When given the choice of the type of services you want to install, select "LAMP" (so that you get apache, php and mysql), and "OpenSSH Server" (assuming you will be connecting to it remotely via SSH - if not, you don't necessarily need this). If you want your zabbix server to send you alerts by email, you should also select "Mail Server", and choose the option to send and receive by SMTP.

When the Ubuntu installation is finished, you should be able to point your web browser to the server's IP number, and see a directory listing of the sites you have configured. Initially, this should show "apache2-default", which will simply show a page saying "It works!" if you click on it.

Now login to the server and execute the following command;

  • sudo aptitude install zabbix-server-mysql zabbix-frontend-php

This will install the zabbix server, configured to use mysql as its database, and the PHP frontend gui for zabbix. At the time of writing, the zabbix package available for Ubuntu 7.10 is version 1.4.1. I stuck with this, rather than building the current 1.4.2 version from source, but there is a good walk-through here if you'd prefer to do that.

After this, there are a couple of changes you need to make in the PHP configuration.

  • sudo vi /etc/php5/apache2/php.ini
  • Set the "date.timezone" value ( in my case, to Europe/London, but you can find a list of values here )
  • Set the "max_execution_time" to 300

Restart apache so that it picks up these changes

  • sudo /etc/init.d/apache2 restart

Now, visit http://[your server ip]/zabbix with a browser, and go through the configuration steps.

At the end of this process, the GUI lets you download your zabbix.conf.php file using your browser. Save the generated file, transfer it to the server, and then

  • sudo mv zabbix.conf.php /usr/share/zabbix/conf/zabbix.conf.php

That's it. You should now be able to login to the zabbix web interface as 'admin' (with no password), and get started.