Skip to main content

IBM Z HMC Prometheus Exporter

Project description

Version on Pypi Test status (master) Docs status (master) Test coverage (master)

The IBM Z HMC Prometheus Exporter is a Prometheus exporter written in Python that retrieves metrics from the IBM Z Hardware Management Console (HMC) and exports them to the Prometheus monitoring system.

The exporter attempts to stay up as much as possible, for example it performs automatic session renewals with the HMC if the logon session expires, and it survives HMC reboots and automatically picks up metrics collection again once the HMC come back up.

Documentation

Quickstart

  • Install the exporter and all of its Python dependencies as follows:

    $ pip install zhmc-prometheus-exporter
  • Provide an HMC credentials file for use by the exporter.

    The HMC credentials file tells the exporter which HMC to talk to for obtaining metrics, and which userid and password to use for logging on to the HMC.

    Download the sample HMC credentials file as hmccreds.yaml and edit that copy accordingly.

    For details, see HMC credentials file.

  • Provide a metric definition file for use by the exporter.

    The metric definition file maps the metrics returned by the HMC to metrics exported to Prometheus.

    Furthermore, the metric definition file allows optimizing the access time to the HMC by disabling the fetching of metrics that are not needed.

    Download the sample metric definition file as metrics.yaml. It can be used as it is and will have all metrics enabled and mapped properly. You only need to edit the file if you want to adjust the metric names, labels, or metric descriptions, or if you want to optimize access time by disabling metrics not needed.

    For details, see Metric definition file.

  • Run the exporter as follows:

    $ zhmc_prometheus_exporter -c hmccreds.yaml -m metrics.yaml
    Exporter is up and running on port 9291

    Depending on the number of CPCs managed by your HMC, and dependent on how many metrics are enabled, it will take some time until the exporter reports to be up and running. You can see what it does in the mean time by using the -v option. Subsequent requests to the exporter will be sub-second.

  • Direct your web browser at http://localhost:9291 to see the exported Prometheus metrics. Refreshing the browser will update the metrics.

Reporting issues

If you encounter a problem, please report it as an issue on GitHub.

License

This package is licensed under the Apache 2.0 License.

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-1.3.0.tar.gz (24.9 kB view details)

Uploaded Source

Built Distribution

zhmc_prometheus_exporter-1.3.0-py2.py3-none-any.whl (25.0 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

File hashes

Hashes for zhmc_prometheus_exporter-1.3.0.tar.gz
Algorithm Hash digest
SHA256 f2a0be3563b5e5a5059cb58fc5403b37a7a36996b5338bb7f4bbe8b52b7dbc6c
MD5 2bde96f60978b2b412eb87edcdf86d6c
BLAKE2b-256 10544bfe200873e6f3ec51de317941e7ebd950115bb53e2bb21d8a9896c29eb4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zhmc_prometheus_exporter-1.3.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7c8194bb12c0e49f8bd6896dd3f0a7af8b8116699e5de8dbbbbf9bc32e74c433
MD5 0e00241a85275cff21daa178c215ef4a
BLAKE2b-256 b77e56ca70829fd55e54274eefe6a8ffdc16120f870035049225441482c6eaeb

See more details on using hashes here.

Supported by

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