In recent years, infrastructure and application architecture has gone through a paradigm shift toward the cloud and microservices. This has meant that applications are getting smaller and more distributed and are being run increasingly on cloud servers. Most of the time, you don’t know—or care—where an application is running, such as in a serverless ecosystem. But today, monitoring in the cloud-native era is more important than ever. 

There are various tools, both open-source and proprietary, that are focused on monitoring cloud-native microservices. In this blog, we will offer up a comparison and use cases for four mainstream open-source monitoring tools: Prometheus, Graphite, Grafana, and Kibana. 

Open-Source Monitoring Tools

Before diving into a deeper comparison between these solutions, here below, we give a brief summary of each.

Prometheus

Prometheus is a monitoring system focused on collecting metrics, evaluating rule expressions, displaying the collected info, and triggering alerts. It is a popular open-source tool located at prometheus/prometheus and boasting more than 34,000 stars and 5,000 forks. Its top three features are:

  • Easy to install and configure
  • Flexible query language
  • Dimensional data model 

If you want to learn more about Prometheus check out these blog posts about Thanos and scaling Prometheus for Kubernetes.

Graphite

Graphite is one of the oldest time-series monitoring tools, with its first release in 2008. It has two essential features that allow you to store numeric time-series data and create graphs, with a layered architecture to collect, aggregate, and visualize the data. The top three advantages of Graphite are:

  • Extensive functions to apply on time-series data
  • Comprehensive graph-rendering capability
  • Well-supported integration points

Grafana

Grafana is a popular open-source visualization and analytics tool that focuses on providing rich visualizations of time-series metrics. It supports various data sources, including but not limited to Prometheus, Graphite, InfluxDB, Elasticsearch, and Splunk. The top three pros of Grafana are:

  • Beautiful visualizations
  • Interactive graphs
  • Easy to set up and create dashboards

Kibana

Kibana is known as the “K” in the ELK Stack—Elasticsearch, Logstash, and Kibana—that monitors machine logs. Kibana is the console and web-based user interface of the stack that lets you query and visualize logs. The top three advantages of Kibana are:

  • Extensive capabilities to drill down into logs
  • Out-of-box integration with ELK Stack 
  • Easy to query and view data

Now, let’s focus on comparing the tools based on their key functionalities and prominent features. 

Key Differences and Use Cases

All the tools listed in the previous section are highly adopted in the industry and very popular, with one or even a couple used widely in cloud-native application monitoring. However, despite their core functionalities being similar, they are not identical. So in this section, we’ll compare all four open-source monitoring tools based on possible use cases and integration points.

Prometheus vs. Graphite

Both Prometheus and Graphite store time-series data and provide visualizations. The key differences between them arise from their architectural dissimilarities and objectives:

  • Prometheus is a full-featured monitoring system with built-in scraping, storing, querying, and alerting. On the other hand, Graphite is a passive tool where scraping and alerting are handled by external components. 
  • Prometheus supports a broader set of client libraries compared to Graphite.
  • Prometheus provides partitioning and replication, whereas you need external tools to make Graphite scalable.

If you want to store historical data for a long time, there are various tools, such as fluentd, collected, or statd, that make this a simple task, as you can easily configure your metric providers and collect data. However, if you start from scratch in a cloud-native world where data only has to be stored for a short period of time, you should choose Prometheus due to its user-friendly, integrated approach to scraping, querying, and alerting.

Prometheus vs. Grafana

Prometheus and Grafana both focus on time-series data but in two different ways: gathering versus reporting. In other words, Prometheus is the tool to scrape, store, and query the data, whereas Grafana is the one to visualize and report it. Prometheus also supports visualization and reporting, but it is limited to query expressions and their plots:

Figure 1: Prometheus graph visualization (Source: Prometheus Docs)

On the other hand, you can create rich and interactive dashboards with multiple graphs and sources via Grafana:

Figure 2: Grafana dashboard (Source: Digital Ocean Tutorials)

Instead of choosing either Prometheus or Grafana, it is recommended to use them together. You should deploy Prometheus with scraping targets to collect metrics. Then, you can connect Prometheus as a data source to Grafana to create stunning dashboards. You can read more about this strong alliance in our blog post, “Prometheus and Grafana: The Perfect Combo.”

Prometheus vs. Kibana

Kibana is an integrated part of ELK Stack, whereas Prometheus is a monitoring system on its own. Therefore, comparing these two tools makes Kibana look less capable. However, Kibana provides real-time analysis, visualization, and debugging capabilities, plus you can create and share URLs or export the Kibana dashboard with its intuitive and user-friendly interface:

Figure 3: Kibana Dashboard (Source: Kibana)

It is suggested to use ELK Stack and the Kibana web console for the following use cases:

  • Dealing with event logs that require long-term storage
  • Processing immense amounts of log data
  • Investigating for deep insights into specific events

Prometheus is a better option for the following use cases:

  • Dealing with metrics
  • Simple deployment and configuration
  • Creating and managing alerts

Graphite vs. Grafana

Grafana is currently the most popular visualization tool and provides a variety of graphs, charts, and tables for any kind of database. Meanwhile, Graphite can store metrics and generate graphs. You can connect Graphite as a data source to Grafana, but not the other way around because Grafana is a query and visualization tool, whereas Graphite is a data store. 

If you are looking to create customizable and rich dashboards, it is recommended to start with Grafana. On the other hand, if you are already using Graphite to store metrics, you can either create dashboards on Graphite or connect to Grafana as a data source.

Graphite vs. Kibana

Graphite and Kibana focus on two different things when it comes to monitoring: time-series data and log data. You should use Graphite for the following use cases:

  • Time-series data monitoring
  • Visualizing data from multiple sources
  • Creating and managing alerts

Kibana and ELK Stack are preferred for:

  • Searching log data
  • Filtering, investigating, and searching for “the needle” in event logs
  • Processing and creating forecasts from collected data

Grafana vs. Kibana

The primary use for Grafana is to analyze and visualize time-series metrics such as memory usage, CPU, or disk usage. You can also use various visualization types, such as histograms, heat maps, gauges, text panels, or tables in Grafana. Kibana is mostly used to analyze log messages like system events; it offers various visualization options such as pie charts, geo maps, data tables, or tag clouds as well. 

You should go with Grafana to collect metrics from multiple data sources with built-in integration to Prometheus, Elasticsearch, MySQL, PostgreSQL, or Graphite, whereas Kibana only supports Elasticsearch as its data store. 

Summary

A comparison of the features and capabilities of the open-source monitoring tools discussed in this post can be summarized as follows: 

Prometheus Graphite Grafana Kibana
Scope Integrated time-series store and monitoring system Time series store and graphs Interactive visualization and analysis  Visualize Elasticsearch data and navigate Elastic Stack
Data collection Yes Yes, with tooling No No
Visualization Yes Yes Yes Yes
Dashboard No Yes, limited Yes Yes
Implementation Language Go Python Go JavaScript
Data type  Numeric Numeric Several types Log
Supported API types REST, JSON HTTP API Sockets HTTP API REST
Release date 2012 2006 2014 2013

The use of monitoring and visualization systems is indispensable for cloud-native microservice applications. Every organization should choose one or a subset of relevant tools based on their capabilities and required maintenance. The key differences and use cases in this blog can serve as a guide to setting up a proper monitoring stack. With this in place and the accompanying collected metrics, your development and operations teams will gain a bigger picture of, and visibility into, your company’s infrastructure and applications.

Read More:

Zipkin vs. Jaeger: Open Source Tools for Distributed Tracing

Monitoring Microservices-based Environments Using Epsagon

Introduction to Epsagon Service Maps