Skip to main content

A prometheus.io exporter for metrics from the IBM Z HMC

Project description

https://travis-ci.org/zhmcclient/zhmc-prometheus-exporter.svg?branch=master https://readthedocs.org/projects/zhmc-prometheus-exporter/badge/?version=stable https://coveralls.io/repos/github/zhmcclient/zhmc-prometheus-exporter/badge.svg?branch=master

A prometheus.io exporter written in Python for metrics from the IBM Z Hardware Management Console using zhmcclient. Tested with Python 3.4 through 3.7.

Installation

$ pip3 install zhmc-prometheus-exporter

Documentation

Read the Docs

Quickstart

The exporter itself

Set up your exporter. Edit your credentials YAML file. A sample credentials YAML is provided. Enter the IP address of the HMC, your username, and your password there. Put this file and metrics.yaml into /etc/zhmc-prometheus-exporter/. The latter defines the metrics and descriptions, you do not have to edit it. You can then run

$ zhmc_prometheus_exporter

The default port is 9291, you can change it with -p. If you do not want to put hmccreds.yaml and metrics.yaml into /etc/zhmc-prometheus-exporter, you can also specify them with -c and -m respectively.

Demo setup

If you want a quick “three simple metrics” setup with Prometheus and Grafana you can proceed as follows:

  • Set up a Prometheus server. Get it from Prometheus. A sample configuration YAML is provided. Fill in the IP and port the exporter will run on. If you left it at default, the port will be 9291. You can then run:

    $ ./prometheus --config.file=prometheus.yaml

    See also Prometheus’ guide.

  • Set up a Grafana server. Get it from Grafana. You can then run:

    $ ./bin/grafana-server web

    By default it will be on localhost:3000. You will have to set IP and port of the Prometheus server. If you didn’t change it, it’s localhost:9090. See also Prometheus’ guide on Grafana.

  • Create the dashboard in Grafana. A sample JSON is provided. If you want it to work natively, you will have to name your source ZHMC_Prometheus.

The following image illustrates what the setup described above could look like.

Deployment diagram of the example

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zhmc_prometheus_exporter-0.3.0.tar.gz (39.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zhmc_prometheus_exporter-0.3.0-py2.py3-none-any.whl (14.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file zhmc_prometheus_exporter-0.3.0.tar.gz.

File metadata

  • Download URL: zhmc_prometheus_exporter-0.3.0.tar.gz
  • Upload date:
  • Size: 39.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.6.8

File hashes

Hashes for zhmc_prometheus_exporter-0.3.0.tar.gz
Algorithm Hash digest
SHA256 9d96e5aebea2925e248637b7901554aece69c057c4755d4e3f34af65f67d6691
MD5 0c40e7501d40b05de43ddbb62338c5f5
BLAKE2b-256 7f0253dcb3d02ad0a124949038d44f08c35e744fc635f58f497a4d916d129ea9

See more details on using hashes here.

File details

Details for the file zhmc_prometheus_exporter-0.3.0-py2.py3-none-any.whl.

File metadata

  • Download URL: zhmc_prometheus_exporter-0.3.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 14.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.6.8

File hashes

Hashes for zhmc_prometheus_exporter-0.3.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e98c4c192376350a1673042b098be821ed748519985c3ec62d03b853b150b22a
MD5 2391875bbd1c26bca66782908a62434d
BLAKE2b-256 984afa59e2776cd061cf1f1e78037aac01b31538507f1d431d4220f260aba868

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page