Zabbix is a popular server monitoring tool that helps proactively manage systems and applications. In the past,...
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
installing a Zabbix host was hard to do, but that’s no longer the case with recent Ubuntu versions. In this tip, read how to set up Zabbix as a monitoring host on Ubuntu 11.04.
Currently, there are two methods for evaluating Zabbix: installing the Zabbix Server and downloading the Zabbix Appliance. If you are serious about implementing Zabbix, you should install the Zabbix Server on a server in your network. Currently, Ubuntu offers the best support for this kind of installation, as there is a package that is easily installed using the apt-get command. On the other hand, the Zabbix Appliance is ready to run so that you can evaluate it before installation. The Zabbix server monitoring tool is available for different platforms and you can download it for free.
Installing Zabbix Server
In the past, setting up a Zabbix environment was difficult because you had to set up a long list of preliminary packages and, after downloading and installing them, you had to download the Zabbix source files and compile them to work on your computer. On the latest version of Ubuntu, it's a lot easier to install the server monitoring tool.
The only package you need to install before the Zabbix installation is Apache2 and a database. In this article, we'll assume that you are using MySQL as the database and that the database itself has already been installed. You can run the following command to install Zabbix:
sudo apt-get install zabbix-server-mysql
This command makes sure that all required software is installed to your computer, based on the MySQL database. There is also a postSQL version of Zabbix, which uses Postgres. I recommended only using this if you already have a Postgres installed. In all other cases, use the MySQL version of Zabbix.
After installing the software, the installer will prompt for additional information. If you're an experienced database administrator, you can set up the database yourself. If not, it is probably better to set up the database through the installation program. Select Yes to set up the database automatically.
At this point, a database admin user is already created to give you access to the database that the installation program is going to set up for you. You can just hit Enter to give the database admin a randomly generated password, but that means you won't know what the password is. It's much better to specify the password for the dabatabase admin yourself and select OK to proceed.
Create a database admin user and give that user a password.
The most tedious part of the work is now done, and you can proceed by completing the package setup program. In some cases, you might get an error while populating the database. If that happens, you can click Abort. This will continue the procedure and automatically fix most problems. At the end of the first run, an error will appear. Just relaunch the apt-get install zabbix-server-mysql command and the installation of the Zabbix Server will be automatically completed.
Testing the configuration
At this point, your Zabbix Server should be ready to go. Before taking it for a test drive, it's a good idea to restart your server so that all services involved re-initialize their configuration. Next, run a browser against http://localhost/zabbix to access the default Zabbix monitoring page. You'll notice that the page is pretty empty. Once you've set up the agents on the nodes that you want to monitor, the page will populate and you can begin using the server monitoring tool.
Using the Zabbix Appliance
After installing the Zabbix Appliance, you'll get a .tar.gz archive file that contains all you need to run the appliance. To start working with the appliance, you should take the following steps:
Open a console window and copy the .tar.gz file to the directory where it should be installed.
- Use the tar zxvf command to extract the appliance files. To extract a VMware appliance, for example, you would use the following command: tar zxvf zabbix_x86.i686-1.8.4.vmx.tar.gz.
- Apply correct file ownership. The following command shows how to make a user and group the owners of the entire appliance subdirectory: chown user.group Zabbix_x86-1.8.4/
- Run the environment from which you want to use the appliance and open the appliance file. This allows you to run the file directly. After starting the appliance, it will get an IP address from the Dynamic Host Configuration Protocol server in your network and tell you from which address you can access the Zabbix management page. For example, the address could be http://192.168.1.74/zabbix.
- Connect to the Zabbix login page using the default username zabbix and the password admin. This brings you to the front page of your Zabbix system, which should be empty.
On a freshly installed Zabbix interface, you'll see nothing at all.
In this article, you've read how to set up a Zabbix Server on Ubuntu 11.04. You've also learned how to download and install the Zabbix Appliance, which allows you to do a quick evaluation of the product. In a follow-up to this article, you'll read how to install the Zabbix agent on the devices that you want to manage. You’ll then be on your way to building a complete Zabbix environment with a versatile monitoring system.
About the author: Sander van Vugt is an independent trainer and consultant living in the Netherlands. Van Vugt is an expert in Linux high availability, virtualization and performance and has completed several projects that implement all three. He is also the writer of various Linux-related books, such as Beginning the Linux Command Line, Beginning Ubuntu Server Administration and;Pro Ubuntu Server Administration.