Zabbix- A Simpler way of Monitoring

March 8, 2017 | Comments(8) |

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 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.

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.

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

Zabbix_Arch

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.

Note: Zabbix 3.0 require PHP 5.4 later

  • Configure mysql

  • Configure yum repository to install Zabbix

  • Install Zabbix server

  • Configure apache

Open httpd.conf and add a virtual host entry for zabbix

Append following content in the file and save it

  • Configure database for Zabbix

Create a user and database for zabbix.

After creating database restore the default mysql database provided by zabbix

  • Disable SELinux and Start Zabbix Server

  • Start your Zabbix web installer

Web installer can be accessed from your web browser using your machine’s FQDN or Public IP.

WebInstaller

  • Check for pre-requeisites

Check if you meet all the system requirements. If not configure your php.ini.

prerequest

  •  Configure DB Connection

Fill your DB details which you created  and click on Next Step

DB

  • Zabbix server details

Edit your server details

Server

  • Pre-Installation Summary

This will give you a summary of your configuration. Click on Next Step

summary

  • Install Zabbix

Click on Finish button to install Zabbix server

install

  • Login to Zabbix

Login to Zabbix with following credentials

UserName: Admin

Password: Zabbix

login

You will see your Zabbix home screen now

HomeScreen

Please write us at forum.cloudthat.com for any queries.


8 Responses to “Zabbix- A Simpler way of Monitoring”

  1. Rahul

    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??

    Reply
    • Sherin Shahanas Sherin Shahanas

      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.

      Reply
  2. Nikesh

    Good work Sherin!!
    Is there any way we can monitor JAVA application on Zabbix?

    Reply
    • Sherin Shahanas Sherin Shahanas

      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.

      Reply
  3. Yaakov Berkovitch

    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.

    Reply
  4. Kinjal

    Nice article Sherin!! We have different clusters of servers on different networks. Is it possible to consolidate monitoring information across these clusters?

    Reply
    • Sherin Shahanas Sherin Shahanas

      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.

      Reply

Leave a Reply