Prometheus Juju Exporter

  • By Canonical BootStack Charmers
Channel Revision Published Runs on
latest/stable 12 01 Nov 2023
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04
latest/candidate 15 07 May 2024
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04
latest/edge 15 07 May 2024
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04
juju deploy prometheus-juju-exporter --channel candidate
Show information

Platform:

Ubuntu
22.04 20.04 18.04

Integrate with COS

Prerequisites

Bootstrap a juju controller on a microk8s cloud. Steps can be found in this guide.

Note: This is a separate controller from the one managing the Prometheus Juju Exporter charm. We plan to build a cross model integration here.

Deploy COS-Lite

Follow these steps to set up cos-lite on microk8s: Deploy cos-lite on microk8s

Ensure to set up cos-lite with this offers overlay so that the COS model is ready for cross model relations. Relevant section in the above guide here.

Relate Prometheus Juju Exporter to COS

Once the COS-Lite bundle is fully deployed and ready, we can proceed with the integration. Start by returning to the controller and the model that hosts the Prometheus Juju Exporter charm.

juju switch other-controller:pje-model

COS integration leverages juju offers. Verify if these offers are visible.

# verify if offers are present
juju find-offers -m microk8s-controller:cos-model

Then consume and add cross-model relations.

# add cross-model relation
juju consume microk8s-controller:cos-model.prometheus-scrape cos-prometheus-scrape
juju consume microk8s-controller:cos-model.grafana-dashboard cos-grafana-dashboard

# add relations to prometheus-juju-exporter
juju add-relation cos-prometheus-scrape prometheus-juju-exporter:prometheus-k8s-scrape
juju add-relation cos-grafana-dashboard prometheus-juju-exporter:grafana-k8s-dashboard

Check the dashboard

As described in this section of the COS docs, you can connect to Prometheus and Grafana, and verify that the metrics and alert rules from Prometheus Juju Exporter are present.