Prometheus Scrape Config (K8s)

  • By Michele Mancioppi
Channel Version Revision Published Runs on
latest/beta 18 18 31 Jan 2022
Ubuntu 20.04
latest/edge 30 30 20 Apr 2022
Ubuntu 20.04
juju deploy prometheus-scrape-config-k8s --channel beta
Show information

Platform:

Prometheus Scrape Config Operator

The Prometheus scrape config operator enables you to apply a set of configurations to the scrape jobs provided by its upstream charms, and forward the modified scrape jobs downstream to one or more consumers that will actually perform the scraping.

Usage Example

$ juju deploy prometheus-k8s      # Deploys Prometheus
$ juju deploy cassandra-k8s       # Deploys Cassandra

# Deploys the prometheus-scrape-configuration, specifying a custom scrape interval valid only for the
# scrape job forwarded to prometheus-k8s through its relation with this charm
$ juju deploy prometheus-scrape-configuration-k8s scrape-interval-config --config scrape_interval=20s

# Link cassandra as scrape target, so that Cassandra’s address is used as a
# static_configs in the scrape job
$ juju relate cassandra-k8s scrape-interval-config
$ juju relate scrape-interval-config prometheus-k8s

Relations

  • A configurable-scrape-jobs relation with any Charm that uses the MetricsEndpointProvider to implement the prometheus_scrape interface.
  • A metrics-endpoint relation with one or more Charms that implement the MetricsEndpointConsumer, such as the Prometheus charm.

Contributing

Please see the Juju SDK docs for guidelines on enhancements to this charm following best practice guidelines, and CONTRIBUTING.md for developer guidance.