Do you want your ad here?

Contact us to get your ad seen by thousands of users every day!

[email protected]

MicroProfile Metrics with Prometheus and Grafana

  • December 02, 2020
  • 1455 Unique Views
  • < 1 min read

In a distributed microservices architecture, it is important to have an overview of your systems in terms of CPU, memory management and other important metrics.

This is called Observability, measuring the internal state of a system, in this case, the micro-services instances.

These metrics are gathered centrally, so that you can instantly have an overview of all the values and it allows the determination (mostly automated based on some rules) of the health of the instances.

MicroProfile Metrics allows you to expose some custom defined metrics, but also exposes system metrics, related to CPU and memory, for example.

In this short video Rudy de Busscher shows how to connect MicroProfile Metrics with Prometheus and Grafana to produce useful graphics and to help investigate your microservice architecture.

The goal of MicroProfile Metrics is to expose monitoring data from the implementation in a unified way. It also defines a Java API so that the developer can define and supply his own values.

Prometheus is one of the most popular Open source solutions for gathering metrics. Created in 2012 by SoundCloud (online audio distribution platform and music sharing) and in 2018 graduated at the Cloud Native Computing Foundation. It can be used as a database for storing time series but has many more features:

  • Multi-dimensional data model with time series
  • Query Language
  • Pull data from metric sources
  • Alert Manager

Therefore, MicroProfile Metrics exposes the values in the Prometheus format by default. So it can be consumed easily by the scrapers.

Grafana is a multi-platform open source solution for running data analytics, pulling up metrics that make sense of the massive amount of data, and monitoring apps through customizable dashboards.

Republished with permission from the original author - Rudy De Busscher

Do you want your ad here?

Contact us to get your ad seen by thousands of users every day!

[email protected]

Comments (2)

Highlight your code snippets using [code lang="language name"] shortcode. Just insert your code between opening and closing tag: [code lang="java"] code [/code]. Or specify another language.

Stephan avatar

Stephan

3 weeks ago

Hey, you might consider adding these other VoxxedDays events too for 2025 @ https://events.voxxeddays.com #Thanks

26

Highlight your code snippets using [code lang="language name"] shortcode. Just insert your code between opening and closing tag: [code lang="java"] code [/code]. Or specify another language.

Geertjan avatar

Geertjan

3 weeks ago

Thanks, will do, Stephan!

10

Highlight your code snippets using [code lang="language name"] shortcode. Just insert your code between opening and closing tag: [code lang="java"] code [/code]. Or specify another language.

Subscribe to foojay updates:

https://foojay.io/feed/
Copied to the clipboard