Install Zabbix Monitoring Tool On Debian 7 / Ubuntu 13.10
Zabbix is an enterprise-class open source distributed monitoring solution that can be used to monitor and track performance and availability of network servers, devices and other IT resources. It supports distributed and WEB monitoring, auto-discovery, and more.
I tested this how-to On Debian 7, although it should work on other Debian/Ubuntu derivatives. For the testing purpose, I will use two machines.
Zabbix Server System:
Operating system: Debian 7 IP Address: 192.168.1.200/24 Hostname: server.unixmen.com
Zabbix Client System:
Operating system: Ubuntu 13.04 IP Address: 192.168.1.100/24 Hostname: sk
First let us start from server side.
Before installing Zabbix, we should have install and configure LAMP stack on server. To install and configure LAMP server On Debian 7 and Ubuntu 13.10, refer the following links.
Server Side Configuration
Zabbix is found in the default repositories, but it may be outdated. So to install most recent version, download the latest repository configuration package from here.
Or you can download and install it using commands:
# wget http://repo.zabbix.com/zabbix/2.2/debian/pool/main/z/zabbix-release/zabbix-release_2.2-1+wheezy_all.deb # dpkg -i zabbix-release_2.2-1+wheezy_all.deb
Now update package lists and Zabbix server using commands:
# apt-get update # apt-get install zabbix-server-mysql zabbix-frontend-php
During installation, you’ll be asked to answer couple of questions regarding database configuration.
Please Note: For Debian 6 and earlier versions, you should create a new database and give proper permission to the database manually.
Next we will adjust some PHP settings for zabbix front-end.
Edit file /etc/apache2/conf.d/zabbix,
# nano /etc/apache2/conf.d/zabbix
Find the following lines and edit them as follows. If the lines doesn’t exists, add them.
[...] php_value max_execution_time 300 php_value memory_limit 128M php_value post_max_size 16M php_value upload_max_filesize 2M php_value max_input_time 300 php_value date.timezone Asia/Kolkata [...]
It is mandatory, to adjust the correct time zone for you. Save and close the file.
Restart apache service:
# service apache2 restart
Access Zabbix Web Console
Open web browser and access the zabbix web console with URL: http://ip-address/zabbix or http://domain-name/zabbix.
Click Next to continue:
zabbix agent is used to send the reports to the server. Let us install this package on our server with following command:
# apt-get install zabbix-agent
At the server side you don’t have to configure agent, default values will work just fine.
Now go to the Dashboard and navigate to Configuration tab on the tab menu bar. Click on the Hosts tab. You’ll see that the zabbix server is present there.
Click on the name of the server and set host name and change value of Status to “Monitored” at the bottom. Then click Save.
Check Zabbix server Statistics
Now click on the Monitoring tab on the top menu bar and select “Latest data”. You’ll see the zabbix server details:
Install zabbix-agent package in your client system:
$ sudo apt-get install zabbix-agent
Next edit file /etc/zabbix/zabbix_agentd.conf,
$ sudo vi /etc/zabbix/zabbix_agentd.conf
Add the server ip address and client hostname.
[...] Server=192.168.1.200 [...] Hostname=sk [...]
192.168.1.200 – Debian 7 Ip address(Zabbix server).
sk – Ubuntu 13,04 hostname(client hostname).
Now restart zabbix-agent service with command:
$ sudo service zabbix-agent restart
Add Monitoring host – Method 1
Next go to the zabbix server Dashboard. Go to Configuration -> Hosts and click on your zabbix server name. This time it will show a option called Clone on the bottom. Refer the following screenshot.
From the Dashboard, go to Configuration -> Hosts. Click on Create host on the right side.