Prometheus

  • By Balbir Thomas
Channel Version Revision Published Runs on
latest/stable 79 79 21 Oct 2022
Ubuntu 20.04
latest/candidate 79 79 21 Oct 2022
Ubuntu 20.04
latest/beta 79 79 21 Oct 2022
Ubuntu 20.04
latest/edge 86 86 Yesterday
Ubuntu 20.04
1.0/stable 79 79 21 Oct 2022
Ubuntu 20.04
1.0/candidate 79 79 21 Oct 2022
Ubuntu 20.04
1.0/beta 79 79 21 Oct 2022
Ubuntu 20.04
1.0/edge 79 79 21 Oct 2022
Ubuntu 20.04
juju deploy prometheus-k8s
Show information

Platform:

Prometheus Charmed Operator for K8s

Description

The Prometheus Charmed Operator provides a cluster monitoring solution using Prometheus, which is an open source monitoring system and alerting toolkit.

This repository contains a Juju Charm for deploying the monitoring component of Prometheus in a Kubernetes cluster. An alerting service for Prometheus is offered through a separate Charm.

Usage

The Prometheus Operator may be deployed using the Juju command line:

$ juju deploy prometheus-k8s --trust

By default, the Prometheus Operator monitors itself, but it also accepts additional scrape targets over Juju relations with charms that support the prometheus_scrape interface and preferably use the Prometheus charm library. This charm library provides an add_endpoint() method that creates additional scrape targets. Each scrape target is expected to expose a /metrics HTTP path that exposes its metrics in a Prometheus compatible format. For example, the kube-state-metrics charm integrates with the Prometheus K8S charm in a way that allows you to import metrics about resources in a Kubernetes cluster by doing:

$ juju deploy kube-state-metrics
$ juju relate kube-state-metrics prometheus-k8s

In a similar manner any charm that exposes a scrape target may be related to the Prometheus charm.

Note: At present it is expected that all relations that Prometheus is part of are within the same Juju model. For cross-model relations, please set up a Grafana Agent in the remote model and use remote_write to get the metrics into Prometheus.

Dashboard

The Prometheus dashboard may be accessed at a configurable port (default: 9090) on the IP address of the Prometheus unit. This unit and its IP address may be determined using the juju status command.

Use Cases Supported

  • Configure scrape targets through Juju relations.
  • Configure alerting rules through relations with scrape target charms.
  • Enable alert forwarding through a relation with Alertmanager.
  • Support metrics visualisation through Grafana.

OCI Images

This charm by default uses the latest version of the ubuntu/prometheus image.