mock knf #0

Supports: kubernetes

Deploy this charm on Kubernetes with the CLI. Find out how by reading the docs.


Prometheus exporter for hardware and OS metrics exposed by *NIX kernels, written in Go with pluggable metric collectors.

Prometheus Operator


The Prometheus 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. The alerting component of prometheus is offered through a separate Charm.


A typical setup using snaps, for deployments to a microk8s cluster can be done using the following commands

sudo snap install microk8s --classic
microk8s.enable dns storage registry dashboard
sudo snap install juju --classic
juju bootstrap microk8s microk8s
juju create-storage-pool operator-storage kubernetes storage-class=microk8s-hostpath


Install the charmcraft tool

sudo snap install charmcraft

Build the charm in this git repository

charmcraft build


Create a Juju model for your monitoring operators

juju add-model lma

Deploy Prometheus using its default configuration.

juju deploy ./prometheus.charm

View the Prometheus dashboard

  1. Use juju status to determine IP of the Prometheus unit
  2. Navigate to http://<IP-Address>:9090 using your browser

If required, remove the deployed monitoring model completely

juju destroy-model -y lma --no-wait --force --destroy-storage


Currently supported relations are


Use your existing Python 3 development environment or create and activate a Python 3 virtualenv

virtualenv -p python3 venv
source venv/bin/activate

Install the development requirements

pip install -r requirements-dev.txt


Just run run_tests:



(int) The port prometheus will be listening on