Implementing Hierarchical Federation With Prometheus

45 minutes
  • 2 Learning Objectives

About this Hands-on Lab

Prometheus servers are capable of monitoring a large number of applications and components. However, it does not always make sense to monitor everything with a single Prometheus server. Prometheus provides the ability to federate Prometheus servers, allowing high-level Prometheus servers to collect, and even aggregate, metric data from multiple low-level Prometheus servers. In this lab, you will be able to see how this works. You will configure a high-level Prometheus instance to collect data from multiple lower-level Prometheus servers in a single location.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Configure the Federal Prometheus Server to Scrape Metrics from the Other Two Prometheus Servers
  1. Log in to the Federal Prometheus Server.

  2. Edit the Prometheus configuration.

  3. Implement a scrape configuration to pull metrics from the other two Prometheus servers.

Start the Federal Prometheus Server and Verify Everything Is Working
  1. Start and enable Prometheus on the Federal Prometheus Server.

  2. Access the Federal Prometheus Server in a browser at http://<Federated Prometheus Server Public IP>:9090.

  3. Run a query to view some metric data.

    • You should see metric data for instances that are monitored by the other two Prometheus servers. These instances are called limedrop-web-1:9100 and limedrop-web-2:9100.

Additional Resources

Your company, LimeDrop, has two data centers running their infrastructure. Each data center has its own Prometheus server, responsible for collecting metric data from application and components running in that data center. However, they would like to be able to collect all this data in one place so they can view metrics for the entire infrastructure across both data centers.

Your task is to set up a third, federated Prometheus server to gather metrics from the two existing data center-specific Prometheus servers. Federal Prometheus Server has been set up for this purpose. Prometheus is already installed on that server, but it is not configured or running. Configure Federal Prometheus Server to federate metric data from the other two data center-specific Prometheus servers, and then get Federal Prometheus Server up and running.

Note: You can reach the other two Prometheus servers from the Federal Prometheus Server using either private IP addresses or the hostnames prometheus-ds-1 and prometheus-ds-2.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?