Today, applications have evolved from standalone to the client-server model and ultimately to the cloud-based elastic application. Application performance can directly affect a business, hurting the revenue as customer struggle to complete the process. It’s always been difficult to see what’s going on inside the system. And doing so has become an essential part. Having a good monitoring tool will help us to understand the system status and determine when they are behaving normally and when they are behaving abnormally. When something goes wrong, the tool alerts us quickly and then we can act on it and fix it without affecting customers. Zabbix is a well-known tool to do that for you.
Voiced by Amazon Polly |
Why do we need Application Monitoring?
- Information gathering
Large application produces a humongous number of data that should be monitored and analyzed for the performance and improvement of product and thereby better business.
- Around the clock monitoring
Humans will never be able to monitor each server 24 X 7. But it is very crucial that any unexpected incident on the servers should be notified and act on it immediately.
- Pre-emptive Alerting
Monitoring tool is an invisible team member who will alert you about unexpected things in the system.
What is Zabbix?
Zabbix is an open source, real-time application, and network monitoring tool. It offers monitoring of thousands of metrics collected from physical machines or virtual machines. Zabbix has a web-based management interface which is centralized through a database. With Zabbix, visualization of your data is available in the form of graphs, screens, maps and overviews.
Customized Cloud Solutions to Drive your Business Success
- Cloud Migration
- Devops
- AIML & IoT
Why Choose Zabbix?
- Open Source – Zabbix is purely open source and comes at no cost.
- Active Monitoring – You can easily monitor servers, applications and network devices, gathering accurate statistics and performance data
- Enterprise ready – Zabbix has been designed to scale from small environments to large environments
- Capacity Planning – With the data collected by Zabbix, you will be easy to analyze your infrastructure and plan the capacity accordingly.
Zabbix Architecture
Zabbix is distributed monitoring tool with a central web interface. The simple architecture of Zabbix can be composed of three servers.
- Web Server
- RDBMS Server
- Zabbix server
This setup is good enough to handle large environment successfully. It’s better to use the dedicated server for each one of these components.
Zabbix uses client-server architecture and uses an agent in the servers that should be monitored. This agent gathers all needed information and status from the system and sends to Zabbix server. Zabbix version 3 and above support encrypted communication between server and clients.
The Zabbix server can take input data also from a Zabbix sender or Zabbix proxy servers. Zabbix sender is a command line utility to send application performance and availability data to Zabbix servers for processing. Zabbix proxies are used to monitor remote servers. It can collect performance and availability data behalf of Zabbix server and save it in a buffer locally and then send it to Zabbix server. This way the proxy servers can take on itself some of the load and offload the Zabbix servers.
Let us look at some of the terminologies of Zabbix.
- Frontend – Web interface provided with Zabbix
- Zabbix Server – Central server to collect the data and process it.
- Zabbix agent – A process deployed on client servers to monitor locally
- Host – A networked device that should be monitored
- Host group – A logical group of hosts. It is used when assigning access rights.
- Template – A set of entities (items, triggers, applications, low-level discovery rules, graphs, screens, web scenarios) ready to be applied to one or several hosts
- Item – A data that you want to receive from a host
- Trigger – It is a logical expression which defines a threshold
- Event – Occurrence of something that deserves attention
- Action – Predefined way of reacting to an event.
Install and configure Zabbix
Now let’s look at how to install and configure Zabbix 3.0. I’m going to use one Redhat machine for all the three components. That are Zabbix Web, Zabbix Server and Database.
- Login to your Redhat machine and install required packages.
1 2 3 4 5 |
#yum install httpd httpd-devel #yum install mysql mysql-server #yum install php php-cli php-common php-devel php-pear php-gd php-mbstring php-mysql php-xml php-bcmath #service httpd start #service mysqld start |
Note: Zabbix 3.0 require PHP 5.4 later
- Configure mysql
1 |
#mysql_secure_installation |
- Configure yum repository to install Zabbix
1 2 3 4 5 6 |
CentOS/RHEL 7: # rpm -Uvh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm CentOS/RHEL 6: # rpm -Uvh http://repo.zabbix.com/zabbix/3.0/rhel/6/x86_64/zabbix-release-3.0-1.el6.noarch.rpm CentOS/RHEL 5: # rpm -Uvh http://repo.zabbix.com/zabbix/3.0/rhel/5/x86_64/zabbix-release-3.0-1.el5.noarch.rpm |
- Install Zabbix server
1 2 |
# yum update # yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent zabbix-java-gateway |
- Configure apache
Open httpd.conf and add a virtual host entry for zabbix
1 |
#vi /etc/httpd/conf/httpd.conf |
Append following content in the file and save it
1 2 3 4 5 6 |
<VirtualHost *:80> ServerAdmin admin@zabbix.example.com DocumentRoot /usr/share/zabbix ServerName zabbix.example.com ErrorLog logs/zabbix.example.com-error_log </VirtualHost> |
- Configure database for Zabbix
Create a user and database for zabbix.
1 2 3 4 5 |
# mysql -u root -p mysql> CREATE DATABASE zabbixdb CHARACTER SET UTF8; mysql> GRANT ALL PRIVILEGES on zabbixdb.* to zabbix@localhost IDENTIFIED BY 'password'; mysql> FLUSH PRIVILEGES; mysql> quit |
After creating database restore the default mysql database provided by zabbix
1 2 3 |
#cd /usr/share/doc/zabbix-server-mysql-3.0.7/ #gunzip create.sql.gz #mysql -u zabbix -p --database zabbixdb < create.sql |
- Disable SELinux and Start Zabbix Server
1 2 |
# setenforce 0 # service zabbix-server start |
- Start your Zabbix web installer
Web installer can be accessed from your web browser using your machine’s FQDN or Public IP.
- Check for pre-requeisites
Check if you meet all the system requirements. If not configure your php.ini.
- Configure DB Connection
Fill your DB details which you created and click on Next Step
- Zabbix server details
Edit your server details
- Pre-Installation Summary
This will give you a summary of your configuration. Click on Next Step
- Install Zabbix
Click on Finish button to install Zabbix server
- Login to Zabbix
Login to Zabbix with following credentials
UserName: Admin
Password: Zabbix
You will see your Zabbix home screen now
Get your new hires billable within 1-60 days. Experience our Capability Development Framework today.
- Cloud Training
- Customized Training
- Experiential Learning
About CloudThat
CloudThat is also the official AWS (Amazon Web Services) Advanced Consulting Partner and Training partner and Microsoft gold partner, helping people develop knowledge of the cloud and help their businesses aim for higher goals using best-in-industry cloud computing practices and expertise. We are on a mission to build a robust cloud computing ecosystem by disseminating knowledge on technological intricacies within the cloud space. Our blogs, webinars, case studies, and white papers enable all the stakeholders in the cloud computing sphere.
Drop a query if you have any questions regarding Zabbix and I will get back to you quickly.
To get started, go through our Consultancy page and Managed Services Package that is CloudThat’s offerings.
WRITTEN BY CloudThat
CloudThat is a leading provider of cloud training and consulting services, empowering individuals and organizations to leverage the full potential of cloud computing. With a commitment to delivering cutting-edge expertise, CloudThat equips professionals with the skills needed to thrive in the digital era.
Revanth
Jun 19, 2019
Can we launch Zabbix server in a Private Subnet of AWS VPC and keep it behind AWS Application load balancer and make sure that it is available for hosts which were already being monitored in which zabbix agent is installed. Because I am trying to move Zabbix server from Pub subnet to Pvt and when I do it is not accessible from Application load balancer endpoint for which a CNAME has been created in Route53 and also the moment I started zabbix in private subnet it is giving alert to my mail saying that Zabbix agent is not reachable in all my hosts.
semagn
Aug 24, 2021
how to monitor cloud computing guys
Ramanjulu Bellala
Jun 7, 2019
Is it possible I am trying to monitor containers with zabbix server which is running on VM if possible can you please give me a steps.
Thanks in advance
Ramanjulu Bellala
Jun 7, 2019
Is it possibleI am trying to monitor containers with zabbix server which is running on VM if possible can you please give me a steps.
Thanks in advance
venkat
Aug 13, 2018
How to monitor jvm,heap memory and java threads using zabbix. I am new..so i need step wise document.please
vishal
May 18, 2018
how to monitor zabbix clients which are in diffrent networks or diffrent aws region
bhuvan
Sep 19, 2017
I am trying to install zabbix in amazon EC2 and trying to monitor from aws.Did anyone is did this way.
Pallavi
Jul 4, 2017
Very good article for a beginner. Can you please provide the steps for monitoring the openstack instacnes.Thanks in advance.
Swapnil
Jun 27, 2017
Really helpful, in very descriptive way but client configuration is missing. It would be very helpful if you provide a client configuration also.
Sherin Shahanas
Jul 6, 2017
I will be writing about the client configuration in my next blog. I will keep you posted
Saurabh Gupta
Jun 16, 2017
Nice Article We also use Zabbix for Cloud Monitoring AWS/Azure .It can be further integrated with Grafana to provide a even more intuitive user interface
Kinjal
May 16, 2017
Nice article Sherin!! We have different clusters of servers on different networks. Is it possible to consolidate monitoring information across these clusters?
Sherin Shahanas
May 16, 2017
Yes, It’s possible to have centralized monitoring. To achieve this you should update your routing policy in your network to communicate to Zabbix server.
Also, you can have a VPN connection between the networks, so that you can communicate to Zabbix server using your private IP’s through configured port. Please click here to read how to configure VPN connection between two AWS VPC’s.
Kautilya Fadia
Jul 10, 2017
well in case of monitoring server clusters behind NAT or Firewall you can use zabbix proxy. Also Zabbix agent and zabbix proxy both can be used in Active mode, means agent and proxy send data to server so they run well behind NAT or firewall without any need of VPN. I know this because I’ve been using Zabbix to monitor 600+ server in different clusters.
Yaakov Berkovitch
Apr 25, 2017
Nice paper – Did you think about using docker to simplify the install of zabbix ?
By using a zabbix docker image you have a running instance of zabbix in few minutes.
Nikesh
Mar 12, 2017
Good work Sherin!!
Is there any way we can monitor JAVA application on Zabbix?
Sherin Shahanas
Mar 14, 2017
You can configure Zabbix java gateway to monitor your java applications.
This way, a Zabbix server requests the Zabbix Java gateway a specific JMX counter, which remotely, through the JMX API can provide information about the Java application, without the need for any additional software.
Rahul
Mar 10, 2017
Great work Sherin!!
Just wanted to check is there any way through which we can monitor the containers in zabbix and does it support ecs monitoring as well??
Sherin Shahanas
Mar 11, 2017
Yes Rahul, It’s possible to monitor containers (Docker/LXC) using Zabbix Docker Module. You need two things to get your container monitoring in place.
1. Dockbix agent- Zabbix agent with Docker monitoring
2. Zabbix Template for App container monitoring.
Amazon ECS is a manged container service. By configuring Dockbix agent in your cluster you should be able to monitor your containers. I will be explaining more about configuration of monitoring in the next part of this blog.
Bhavik
Mar 10, 2017
Great Work Sherin. Surely saved couple of hours of cloudOps guy.
Click to Comment