Posts

Showing posts from April, 2022

Monitoring multiple federated instances with Prometheus

Image
 T oday we will be learning about the Prometheus federation. if you are new to Prometheus, You can go through this   blog   to learn about instrumenting Prometheus in an application and this   blog   for configuration of Prometheus server. We will understand when and why to use Prometheus and implement it. What is Prometheus Federation? Prometheus Federation allows a Prometheus server to scrape selected time series from another Prometheus server. it is used to either achieve scalable Prometheus monitoring setups or to pull related metrics from one service’s Prometheus into another. From the above flow diagram, we can see that 3 child Prometheus instances are fetching metrics from 3 different applications. The Prometheus Parent/Federated instance is then fetching and segregating metrics from all the three child instances which then can be visualized in Grafana. Let’s start with the implementation, Configuring a child Prometheus. The Below configuration will be us...

Visualize Prometheus metrics in Grafana

Image
  Hello Friend’s, Today we will be configuring Grafana with Prometheus. Before Starting you should have an understanding of what Prometheus is and how to configure it, If you are new to Prometheus please visit this   link   to understand how you can instrument Prometheus into your application. I assume that you have an application that emits data at  /metrics  by implementing the Prometheus library. if not please visit this  link  for implementing the Prometheus library in your application. The below image shows us sample output from  /metrics. Let's understand the overall picture of how the metrics will be fetched from your application and then visualized in Grafana. The application metrics will be available at  /metrics Prometheus will pull the metrics from the application at regular interval Grafana will be configured with Prometheus data source which can then be visualized. Let's start the real implementation now first, make sure that our...