Prometheus-Grafana Vs Zabbix
To monitor the modern cloud infrastructure SRE(Software reliability Engineer), DevOps personnel has to rely on modern automated monitoring tools such Prometheus, Grafana or Zabbix. These tools can help SREs and DevOps practitioners to analyze the production health of the production environment in the form of graphs on a real-time basis. The tools (Prometheus, Zabbix) collects the data from various resources (virtual machine, Network Storage, Routers..) and stores it locally which can be used later for visualization and analysis.
Both the tools Prometheus and Zabbix are very mature tools but keeping the Prometheus alone against the Zabbix would not be a fair comparison. To compare with Zabbix we should be put Prometheus and Grafana together because the Prometheus server is a data collector which heavily relies on Node Exporter and on the other hand Grafana is used to create the visualization dashboard using the data collected by the Prometheus.
On the other hand, Zabbix is a complete package that stores performance metrics data into the local MySQL database and also provides the visualization dashboard. So instead of using two tools(Prometheus, Grafana), Zabbix is a complete package.
In this article we will go through key features of Prometheus, Grafana and Zabbix also we are going to see what are the differences which make them more powerful and popular among the DevOps community
Table Of Content
- Prometheus and Grafana Overview
- Zabbix Overview
- Prometheus, Grafana Vs Zabbix
- How to choose between Prometheus, Grafana vs Zabbix
- Infrastructure cost for running Prometheus, Grafana and Zabbix
1. Prometheus and Grafana Overview
Prometheus is an open-source tool used by DevOps practitioners for monitoring and alerting. The primary responsibility of the Prometheus is to collect and store the performance metrics from various hardware and virtual resource. All the performance data is being collected in a time series. Apart from collecting and storing the data a user can label the data model using key-value pairs.
The key benefits of using Prometheus -
- It can scrape the data using the various Node Exporter and store it according to the timeline.
- Prometheus has superb support from 3rd party Node Exporter which can help Prometheus to extract a variety of hardware and kernel-related metrics.
- From the Developer perspective Prometheus also has excellent support for query language known as PromQL and with the help of PromQL, you can really drill down on the statistics collected by the Prometheus
- HTTP API support for Prometheus - This is one of the out-of-the-box features with which a developer can fetch the data from the Prometheus server by making HTTP calls.
- Prometheus server has standalone architecture, so you do not have to worry about distributed storage and network latency
- With the help of scrap config yaml you can set up multiple target nodes for collecting the performance metrics
On the other hand, Grafana is also an open-source tool for visualization and analysis. If we look at the broader the spectrum of Prometheus and Grafana then Prometheus is going to be the core layer for scrapping and storing the data whereas Grafana is responsible for fetching the data from the Prometheus server with the help of datasource.
The Key benefits of using Grafana -
Feature enrich dashboard - One of the cool features of the Grafana is it's a feature reach tool where you have multiple options to customize the dashboard according to your preference.
Drag, Drop and support for scripting - Either you can use the drag and drop feature of grafana or you can write down the script for setting up the dashboard.
Annotation - As with the time you will have a multitude of data sitting in the Prometheus server so to simplify that problem Grafana has really good support of Annotation so that you can correlate the data
Plugins - With the help of Grafana you can visualize anything provided you have data in the form of time series. You can write the plugin and provide the data stream to grafana.
Alerts - As a monitoring tool so we should expect some kind of automated alerting from grafana and it does support alerting. If you have Slack or Teams then grafana can send customized alerts to those channels
Datasource - Grafana does not store any kind of data, so we must provide a Datasource to grafana so that graphs can be rendered. Onto the grafana dashboard, you will find a number of data sources that you can configure based on your need.
Native support for Database - There is native support for various databases such Oracle, Mysql, Postgress, etc..
All in all Grafana is can support your on-premise as well as cloud infra for visualization and analysis
2. Zabbix Overview
Zabbix is also one of the open-source enterprise applications developed under GPL(General Public License). Just like Prometheus-Grafana, Zabbix has also very good support for monitoring on-premise as well as cloud infrastructure which includes - servers, virtual machines, applications, databases.
Unlike Prometheus-Grafana where Prometheus's primary responsibility is to collect and store the metrics and Grafana to visualize the data. But if you are using Zabbix then you can achieve data collection as well as visualization using the Zabbix. Zabbix supports both polling and trapping alongside the Web UI for visualization.
Zabbix is built on C language to reduce the memory footprint and it uses support MySQL, Postgress for storing the data.
The key benefits of using Zabbix -
- Auto-discovery allows Zabbix to find any new devices which are available in the network for monitoring.
- Zabbix has distributed architecture so instead of Zabbix centralized server there Zabbix Proxies which is responsible for collecting the data and sending it back to the Zabbix server.
- Zabbix also provides proactive and passive monitoring support.
- Zabbix can be installed on various operating systems such as - Linux/CentOS, Debian/Ubuntu/Rasbian, Suse Linux server, Windows, MacOS
- Zabbix has Server and Client architecture, so you have to install Zabbix agent on each client-side for gathering and sending the data to the Zabbix server.
- Just like Prometheus and Grafana you can create a custom dashboard and run real-time analysis.
3. Prometheus, Grafana Vs Zabbix
Let's talk about what are the key differences between Prometheus-Grafana and Zabbix, also what is unique feature which makes them more suitable for your use -
|Technology implementation||Go||C (Implemented in C for better lower memory footprint)|
|Performance, monitoring data collection and storage||It stored the data locally||The default MySQL Database is used for storage, it also supports Postgress|
|Support for Docker and Kubernetes||No in build support for Docker and Kubernetes|
|Plugins and Integration||Prometheus and Grafana have a variety of opensource plugins to support various infrastructure monitoring||Zabbix has very limited support for 3rd party integration|
|Querying the data for analysis||Prometheus has PromQL for querying the metrics||For Zabbix, you have to use SQL(Structured Query Language) to fetch the metrics from either Mysql or Postgress|
|Dashboard and Visualization||Grafana has really good support for custom dashboard also there are various opensource ready use dashboard which can be imported||Zabbix also has a really good Dashboard but does not support importing dashboard from other developers|
|Alerting||Prometheus and Grafana has really good support for alerting SMS, Microsoft Teams, Slack, Email||Zabbix also has a very good support for alerting on SMS, Microsoft Teams, Slack, Email|
4. How to choose between Prometheus, Grafana vs Zabbix
If you look from the end results which is produced by Prometheus+Grafana and Zabbix then you will not find much of difference because both are doing Monitoring, Alerting, and Dashboard visualization.
But once you start digging more into how you can integrate your infra with wither Prometheus+Grafana or Zabbix then the answer will shift towards Prometheus+Grafana rather than Zabbix -
Here are some key properties which differentiate Prometheus+Grafana from Zabbix -
- Prometheus use
Node exporterto expose its metrics over HTTP but the best thing about
node exporteris you can build your own but similar functionality is not available in Zabbix.
- Prometheus and Grafana are very container agnostic and have native support for Kubernetes and Docker. Zabbix does not have native support for Kubernetes and Docker.
- Prometheus has a Service Discovery approach where each new resource is treated as a service for collecting the metrics whereas Zabbix uses the machine-based resource approach.
- For Zabbix we need to install
agenton the individual server on the other hand Prometheus also require you to install
node exporteron individual resource, but you can configure, enable and disable this node exporter with the the help of `node exporter config YAML such flexibility is missing in the Zabbix.
- Prometheus uses
HTTPbased communication which makes integration with other tools much easier while Zabbix use
TCPbased communication is also quite okay but
HTTPbased integration is most preferred.
5. Infrastructure cost for running Prometheus, Grafana, and Zabbix
To measure the cost of any framework running in the cloud environment, you have to rely on the following parameters -
Once you know the above parameters then it does not measure which cloud platform(AWS, Google Cloud) you are using, you simply have to multiply the hourly rates with the above-mentioned resources
5.1 Measuring operational cost of Prometheus and Grafana
To measure specifically the cost of Prometheus and Grafana, you can simply use the PromQL to fetch the
by putting the
container_cpu_usage_seconds_total parameter in the PromQL. You can also create a New Dashboard
where you can measure the CPU usage in an hourly manner
1(sum(container_cpu_usage_seconds_total) / 60 / 60 ) * 0.0445
Whatever value is return from the above expression can be multiplied by the hourly price of the cloud environment which will give you a rough estimate of the cost involved in running Prometheus and grafana.
Kubernetes - If you are using Kubernetes and you want to measure the operational cost then there is a better alternative for it. You can use Kubecost for measuring and monitoring management.
To reduce the cost of your Kubernetes infrastructure you can use loft.sh which can help you reduce the cost of your Kubernetes infrastructure by using Sleep Node to put namespace into the sleep when no one is using it. Also periodically purging the PODs when not in use. It also has Auto Delete which deletes the namespace that idle for a long time.
5.2 Operational cost Zabbix
Zabbix is an open-source tool but if you are looking for enterprise-level support then they have different tiered based pricing model which starts from Upgrade Light($1500) to Custom Package.
If you are looking for enterprise-level support then Custom package should be the right choice for you because you can get include lots of customization based on your environment setup.
Final words on costing - Although Prometheus and Grafana are opensource if it is not set up properly then running them both in the cloud environment can really shoot up your bills but on the other hand, Zabbix support package can help you to assist in reducing the price of Zabbix in a production environment.
Although both tools(Prometheus+Grafana, Zabbix) support enterprise-level applications considering the
cloud-agnostic development Prometheus+Grafana seems to be better suited for monitoring and alerting.
Prometheus+Grafana does not restrict you from integration with other tools as well as allows you to develop your own customization on top of their existing solution which is a far better adaptable approach nowadays.
Zabbix is very limited in terms of integration, and it is always hard to leave the Zabbix ecosystem once you are into it. If the Zabbix fits your need then they have perfect support for you but if you want to have an option of integration and power of 3rd party plugin then go for Prometheus and Grafana.
Learn more On Prometheus and Grafana -