golang openstack exporter #5

Supports: xenial bionic
Add to new model

Description

This is an exporter that exposes information gathered from Openstack
for use by Prometheus.


Golang Openstack Exporter Charm

GitHub Action CI badge
License: MIT

Usage

This charm requires relation to keystone or configuration of identity credentials, to be able to source metrics about openstack services:

juju deploy cs:~huntdatacenter/golang-openstack-exporter openstack-exporter
juju add-relation openstack-exporter keystone
juju add-relation openstack-exporter prometheus

Development

Here are some helpful commands to get started with development and testing:

$ make help
lint                  Run linter
build                 Build charm
deploy                Deploy charm
upgrade               Upgrade charm
force-upgrade         Force upgrade charm
deploy-xenial-bundle  Deploy Xenial test bundle
deploy-bionic-bundle  Deploy Bionic test bundle
test-bundle           Test deployed bundle with jujuna
push                  Push charm to stable channel
clean                 Clean .tox and build
help                  Show this help

Links

Overview

This charm provides openstack-exporter for prometheus

Build

The fully built charm needs the following source branch
* https://git.launchpad.net/prometheus-openstack-exporter-charm

To build the charm, do:

Prepare the environment

mkdir -p layers charms/xenial
export JUJU_REPOSITORY=$PWD/charms

Clone the repositories

pushd layers
git clone https://git.launchpad.net/prometheus-openstack-exporter-charm
popd

Build the charm, and symlink for juju-1 compatibility

charm build layers/charm-prometheus-openstack-exporter
ln -s ../builds/prometheus-openstack-exporter charms/xenial

Usage

With the OpenStack nova-compute and neutron-gateway charms:

juju deploy local:xenial/prometheus-openstack-exporter

This charm supports relating to keystone, but keystone-credentials
interface seems to be flaky, and hard to remove-relation, so the
charm works around this by adding 'os-credentials' setting as a YAML
dict (see setting description hints)

juju config prometheus-openstack-exporter os-credentials="{ ... }"

juju add-relation prometheus-openstack-exporter swift-storage-z1
juju add-relation prometheus-openstack-exporter swift-storage-z2
juju add-relation prometheus-openstack-exporter swift-storage-z3
juju add-relation prometheus prometheus-openstack-exporter

Configuration

compute
(boolean) Compute service exporter
True
extra-nrpe-args
(string) Additional arguments to set for the check_http Nagios nrpe check. E.g. if you wish to increase timeouts, set to '-w 20 -c 30'.
identity
(boolean) Identity service exporter
True
image
(boolean) Image service exporter
True
network
(boolean) Network service exporter
True
os-credentials
(string) YAML string with admin user to use to query openstack APIs, e.g. "{ username: $OS_USERNAME, password: $OS_PASSWORD, tenant_name: $OS_TENANT_NAME, region_name: $OS_REGION_NAME, auth_url: '$OS_AUTH_URL' }"
port
(int) Port where the exporter listens
9180
prefix
(string) Prometheus prefix for metrics
openstack
snap_channel
(string) This option controlls channel name. Supported values are: "stable", "candidate", "beta" and "edge"
stable
ssl_ca
(string) TLS CA certficate, to be added as OS_CACERT
volume
(boolean) Volume service exporter