prometheus ceph exporter #11

Supports: xenial bionic trusty
Add to new model

Description

This is an exporter that exposes information gathered from Ceph
for use by the Prometheus monitoring system.


Deprecated

The prometheus-ceph-exporter charm will no longer be maintained by prometheus-charmers. If you have this charm installed without a publisher (i.e. "cs:prometheus-ceph-exporter") you do not need to do anything. The charm will automatically update to the new maintainer. If you are referencing "~prometheus-charmers/prometheus-ceph-exporter" you will need to update to the new maintainer: "~llama-charmers/prometheus-ceph-exporter" (https://jaas.ai/u/llama-charmers/prometheus-ceph-exporter)

Juju prometheus Ceph exporter charm

Based on https://github.com/digitalocean/ceph_exporter

Introduction and Preparation

The charm implements ceph-exporter functionality for Prometheus, it consumes the prometheus-ceph-exporter snap package,
Charm needs to be deployed where Ceph is running, a special read-only account ("exporter") will be created by the charm.
Since the snap is confined to his own filesystem, ceph config file and "exporter" keyring will be created in ($SNAP_DATA) :

/var/snap/prometheus-ceph-exporter/current/

How to Deploy:

From the MAAS host:

export JUJU_REPOSITORY=$PWD/charms
export INTERFACE_PATH=$PWD/interfaces

Build the charm

charm build -s xenial

Deploy the charm

juju deploy local:xenial/prometheus-ceph-exporter
juju add-relation prometheus-ceph-exporter ceph-mon:client

To change the port, refer to the daemon_arguments provided by the snap package at:
/var/snap/prometheus-ceph-exporter/current/daemon_arguments

Juju resources

The charm supports juju resources, which can be handy in offline deployments.
Prefetch the snaps:

snap download core
snap download prometheus-ceph-exporter

Provide the snaps as resources to the application:

juju deploy cs:prometheus-ceph-exporter \
--resource prometheus-ceph-exporter=prometheus-ceph-exporter_20.snap \
--resource core=core_7917.snap

Testing

This charm implements amulet testing which can be run to deploy and verify the
charm. With an available environment run the tests with the command:

tox -e amulet

Amulet tests must be run from within a fully built charm folder. If you have
downloaded this charm from source instead of the charmstore it is a layered
charm and must be built and tests run from the build directory. Be aware timers
are used to allow for deployment, if your environment has a particularly slow
time to deploy nodes or blocks packages from installing this can cause failure
for the amulet test.

Amulet tests also require a working juju environment and juju-deployer to run.
Juju can be installed via snap and amulet via pip with with:

sudo snap install juju --classic
sudo pip install bundletester

Unit testing has been stubbed out but does not include comprehensive tests at
this time. When available unit tests can be run with:

tox -e unit

Unit tests do not deploy the charm and do not require building prior to running
the test suite.


Configuration

access-network
(string) The IP address and netmask of the 'access' network (e.g. 192.168.0.0/24) . This network will be used for access to the ceph-exporter metrics.
daemon_arguments
(string) Daemon arguments to pass to the exporter.
nagios_context
(string) A string that will be prepended to instance name to set the host name in nagios. So for instance the hostname would be something like: juju-myservice-0 If you're running multiple environments with the same services in them this allows you to differentiate between them.
juju
nagios_servicegroups
(string) Comma separated list of nagios servicegroups for the graphite check
juju
snap_proxy
(string) DEPRECATED. Use snap-http-proxy and snap-https-proxy model configuration settings. HTTP/HTTPS web proxy for Snappy to use when accessing the snap store.
snap_proxy_url
(string) DEPRECATED. Use snap-store-proxy model configuration setting. The address of a Snap Store Proxy to use for snaps e.g. http://snap-proxy.example.com
snapd_refresh
(string) How often snapd handles updates for installed snaps. The default (an empty string) is 4x per day. Set to "max" to check once per month based on the charm deployment date. You may also set a custom string as described in the 'refresh.timer' section here: https://forum.snapcraft.io/t/system-options/87