Monitoring multiple federated instances with Prometheus

  1. Configuring a child Prometheus.
global:
scrape_interval: 15s
external_labels:
monitor: 'my-app-monitor'
# Scraping the application
- job_name: 'my-application'
scrape_interval: 5s
metrics_path: /metrics
static_configs:
- targets: ['<my-app-service>:<port>'] #add configuration for you app IP, domain name . service name for apps running in kubernetes
scrape_configs:
- job_name: 'my-app-federation'
scrape_interval: 20s
scrape_timeout: 20s

metrics_path: /federate
honor_labels: true

params:
match[]:
- '{__name__=~"job:.*"}'
static_configs:
- targets: ['child-prometheus1:9090'] #Child prometheus
- targets: ['child-prometheus2:9090']
- targets: ['child-prometheus3:9090']

--

--

--

All About Software is a blog by Shubham Deshmukh That focuses on Software To-do’s and don’ts and suggests a better way to implement your dev stuff.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Domain-Driven Design Part II: Tactical Design

Outlook Quick. how to create and use

Mind the Gap…Mind the Gap!

Optimistic Concurrency Management in EntityFramework Core

Introducing COMPETZ on BORA

Coercion & why reading documentation is the secret sauce to great engineering

How to Scrape Product Price From E-commerce

Loop for asynchronous work

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Shubham Deshmukh

Shubham Deshmukh

All About Software is a blog by Shubham Deshmukh That focuses on Software To-do’s and don’ts and suggests a better way to implement your dev stuff.

More from Medium

Visualize Prometheus metrics in Grafana

Deploy Applications on Kubernetes Cluster with GitLab CI/CD Tunnel

Deploy and use ArgoCD with Portainer (part 2)

Metricbeat and Filebeat on RKE2