Custom service discovery with etcd
Prometheus Blog

Custom service discovery with etcd


Summary

This article details how to implement custom service discovery in Prometheus using etcd, a distributed key-value store. It describes building a utility program that watches for changes in etcd (specifically under a `/services` path) and dynamically generates a JSON file of target groups that Prometheus can then use for service discovery. By leveraging etcd's watch functionality, the program efficiently updates Prometheus with new or removed services and instances, enabling automated monitoring without manual configuration.
Read the Original Article

This article originally appeared on Prometheus Blog.

Read Full Article on Original Site

Popular from Prometheus Blog

1
Modernizing Prometheus: Native Storage for Composite Types
Modernizing Prometheus: Native Storage for Composite Types

@bwplotka Feb 14, 2026 12 views

2
Uncached I/O in Prometheus
Uncached I/O in Prometheus

@machine424 Mar 5, 2026 11 views

3
Introducing the Experimental info() Function
Introducing the Experimental info() Function

Arve Knudsen Dec 16, 2025 11 views

4
Announcing Prometheus 3.0
Announcing Prometheus 3.0

The Prometheus Team Nov 14, 2024 11 views

5
Our commitment to OpenTelemetry
Our commitment to OpenTelemetry

@Gouthamve Mar 13, 2024 11 views