Prometheus Service Discovery

Once your code is instrumented, PrometheusPrometheus
Prometheus is an open source, metrics based [[Monitoring]] system. Its data model is kept as a time series, each consisting of key value pairs called labels.

PromQL is a querying language that all...
needs a way to find the services which are exposing the metrics. Yes, you could tell Prometheus where the services are and where they expose metrics, but this approach is not too scalable.

Prometheus has integrations with many service discovery mechanisms (KubernetesKubernetes
Kubernetes is a container orchestration platform. This note serves as a Map of Content for this topic. Start your exploration on one of these notes:

[[K8S Node]]
[[K8S Object]]
[[What happen...
, AWS EC2, Consul). There is also a generic integration for people who are using some more custom solution.

With each integration, you can configure the rules by which Prometheus will scrape your service discovery system (e.g. look for a specific label on the pods). You can also use relabeling to configure how the metadata from your service discovery system maps to resulting Prometheus metrics.


Status: #🌱

References: