Prometheus Scrape Config (K8s)

  • By Canonical Observability
Channel Revision Published Runs on
latest/stable 51 21 Jun 2024
Ubuntu 20.04
latest/candidate 51 04 Jun 2024
Ubuntu 20.04
latest/beta 51 22 May 2024
Ubuntu 20.04
latest/edge 51 30 Apr 2024
Ubuntu 20.04
1.0/stable 44 12 Dec 2023
Ubuntu 20.04
1.0/candidate 44 22 Nov 2023
Ubuntu 20.04
1.0/beta 44 22 Nov 2023
Ubuntu 20.04
1.0/edge 44 22 Nov 2023
Ubuntu 20.04
juju deploy prometheus-scrape-config-k8s --channel 1.0/edge
Show information



Deployment scenarios

Generally, the prometheus config file (example) has the following form:

Section Provided by
global promethehus
rule_files rules from upstream charms; re-structured by prometheus
alerting alertmanager
tracing (not yet implemented)
scrape_configs upstream charms, prometheus-scrape-config

The scrape_configs section is made up of:

Subsection Provided by
job_name upstream charm (optional); topology-prefixed and deduped (consumer side)
static_configs upstream charm
metrics_path upstream charm
relabel_configs upstream charm (optional); topology-adjusted (consumer side)
scrape_interval upstream charm, prometheus-scrape-config
etc. upstream charm, prometheus-scrape-config

This charm updates some values in the scrape_configs section.

The static_configs section is made up of:

Sub-subsection Provided by
targets upstream charm (star notation expanded on consumer side)
labels upstream charm

Help improve this document in the forum (guidelines). Last updated 1 year, 11 months ago.