Skip to main content

A exporter for metrics from the IBM Z HMC

Project description

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


$ pip3 install zhmc-prometheus-exporter


Read the Docs


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.

Files for zhmc-prometheus-exporter, version 0.4.0
Filename, size File type Python version Upload date Hashes
Filename, size zhmc_prometheus_exporter-0.4.0-py2.py3-none-any.whl (14.7 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size zhmc_prometheus_exporter-0.4.0.tar.gz (39.7 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page