Zabbix is the ultimate open source availability and performance monitoring solution. Zabbix offers advanced monitoring, alerting
============
Installation Step is for CentOS 6 or later versions
============
Installing the Zabbix server packages
yum -y install zabbix20-server-mysql zabbix20-web-mysql
Configuring the Zabbix Server
First, we will edit the main Zabbix server configuration file. Open the file with root privileges:
sudo nano /etc/zabbix/zabbix_server.conf
Search for the following properties and set them accordingly.
DBName=zabbix
DBUser=zabbix
DBPassword=Your.Password.Here
MySQL configuration
If MySQL isn’t installed -
yum -y install mysql-server && chkconfig mysqld on && service mysqld start
Create MySQL database, user details for zabbix
Login to MySQL console
Create the Zabbix database:
mysql> create database zabbix;
Query OK, 1 row affected (0.01 sec)
Create zabbix Db user
mysql> create user 'zabbix'@'localhost' identified by 'Your.Password.Here';
Query OK, 0 rows affected (0.00 sec)
Grant Privileges
mysql> grant all on zabbix.* to 'zabbix'@'localhost';
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
We are now done with the initial MySQL configuration. Exit back to the shell:
exit;
Import initial schema,image and data that Zabbix needs to function.
~]# mysql -u zabbix -p zabbix < /usr/share/zabbix-mysql/schema.sql
Enter the password for the user "zabbix" that you configured when prompted:
Do the same with the images file:
~]# mysql -u zabbix -p zabbix < /usr/share/zabbix-mysql/images.sql
And finally, import the data file:
~]# mysql -u zabbix -p zabbix < /usr/share/zabbix-mysql/data.sql
Web server configuration
Apache's configuration is handled automatically by the Zabbix packages by creating /etc/httpd/conf.d/zabbix.conf
Or you can define it manually by creating file /etc/httpd/conf.d/zabbix.conf
Alias /zabbix /usr/share/zabbix
<Directory "/usr/share/zabbix">
Options FollowSymLinks
AllowOverride None
<IfModule mod_authz_core.c>
# Apache 2.4
Require all granted
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order allow,deny
Allow from all
</IfModule>
</Directory>
Set the Zabbix server to start at boot.
chkconfig zabbix-server on
Start the Zabbix server daemon.
~]# /etc/init.d/zabbix-server start
Starting Zabbix server: [ OK ]
Zabbix should now be accessible via http://<your_server_IP>/zabbix
While accessing http://<your_server_IP>/zabbix/ , you may get error related to PHP settings.
Fix any PHP settings as prompted. All settings in red will need to be edited.
With the default settings, post_max_size, max_execution_size and max_input time will need to be modified.
Click next and enter your MySQL user credentials. Click test connection to confirm they are entered correctly.
The following page will confirm your MySQL credentials and your Zabbix server information from the previous page.
Click next and finish to finalize the installation.
After you click finish you will be redirected to the login page. The default login is Admin with password zabbix. After logging in, click on Profile in the upper right hand corner, and then click on Change Password. Enter a new password and click Save.
Installing and Configuring Zabbix Agent
First, install the agent software:
~]# yum install zabbix20-agent
Now, we need to update the configuration file ie /etc/zabbix/zabbix_agentd.conf
Edit /etc/zabbix/zabbix_agentd.conf and set the Server and hostname variable to IP address and hostname of your Zabbix server.
Server=Zabbix.Server.IP.Address
Hostname=Hostname_Of_Current_Machine
Thats it. Now you we can use Zabbix Features like Monitor Everything, Proactive Monitoring, Capacity Planning etc.