IBM Z HMC Prometheus Exporter
Project description
IBM Z HMC Prometheus Exporter
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 supports all metrics provided by the Z HMC and in addition a number of useful metrics that are based on properties of HMC resources (e.g. memory or CPU weight of LPARs). The resource property based metrics are obtained in the background via change notifications emitted by the HMC and via asynchronous retrieval for properties where change notifications are not supported. This keeps the time for providing the metric data to Prometheus short (sub-second to a few seconds).
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
-
If not yet available, install the "pipx" command as described in https://pipx.pypa.io/stable/installation/.
-
Without having any virtual Python environment active, install the exporter as follows:
$ pipx install zhmc-prometheus-exporter
That makes the
zhmc_prometheus_exportercommand available in the PATH, without having to activate any virtual Python environment. -
Provide a config file for use by the exporter.
The exporter config 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.
It also defines whether HTTP or HTTPS is used for Prometheus, and HTTPS related certificates and keys.
Finally, it defines which metric groups to fetch and to provide to Prometheus.
Download the sample exporter config file as
config.yamland edit that copy accordingly.For details, see Exporter config file.
-
Run the exporter as follows:
$ zhmc_prometheus_exporter -c config.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
-voption. Subsequent requests to the exporter will be sub-second. -
Direct your web browser at http://localhost:9291 (or https://localhost:9291 when using HTTPS) 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zhmc_prometheus_exporter-2.3.2.tar.gz.
File metadata
- Download URL: zhmc_prometheus_exporter-2.3.2.tar.gz
- Upload date:
- Size: 199.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
18f1b27dcabe4be83f121abc4525849fca2c805979914472fb7318af37956316
|
|
| MD5 |
3e23531c3ded25aea38e3551249bccc2
|
|
| BLAKE2b-256 |
627a1568add64a188bc831fc3f0ab8da85502d0d9fe7483a233b5b4e5cd38c4c
|
Provenance
The following attestation bundles were made for zhmc_prometheus_exporter-2.3.2.tar.gz:
Publisher:
publish.yml on zhmcclient/zhmc-prometheus-exporter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zhmc_prometheus_exporter-2.3.2.tar.gz -
Subject digest:
18f1b27dcabe4be83f121abc4525849fca2c805979914472fb7318af37956316 - Sigstore transparency entry: 940734412
- Sigstore integration time:
-
Permalink:
zhmcclient/zhmc-prometheus-exporter@3fcdf0a5209548783fbdc20e6242ccf33b64f9bc -
Branch / Tag:
refs/tags/2.3.2 - Owner: https://github.com/zhmcclient
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3fcdf0a5209548783fbdc20e6242ccf33b64f9bc -
Trigger Event:
push
-
Statement type:
File details
Details for the file zhmc_prometheus_exporter-2.3.2-py3-none-any.whl.
File metadata
- Download URL: zhmc_prometheus_exporter-2.3.2-py3-none-any.whl
- Upload date:
- Size: 104.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30a002aa4a9c7117e5dbd92165c8684043d75eae2bba704285607b61b3583fa9
|
|
| MD5 |
9b3ff7e57ad6b2dfcb043804580f359e
|
|
| BLAKE2b-256 |
e921ef51fd82cfaed43d67b1ca6fd1db01c46afb8226e0e1547fa425129fe515
|
Provenance
The following attestation bundles were made for zhmc_prometheus_exporter-2.3.2-py3-none-any.whl:
Publisher:
publish.yml on zhmcclient/zhmc-prometheus-exporter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zhmc_prometheus_exporter-2.3.2-py3-none-any.whl -
Subject digest:
30a002aa4a9c7117e5dbd92165c8684043d75eae2bba704285607b61b3583fa9 - Sigstore transparency entry: 940734436
- Sigstore integration time:
-
Permalink:
zhmcclient/zhmc-prometheus-exporter@3fcdf0a5209548783fbdc20e6242ccf33b64f9bc -
Branch / Tag:
refs/tags/2.3.2 - Owner: https://github.com/zhmcclient
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3fcdf0a5209548783fbdc20e6242ccf33b64f9bc -
Trigger Event:
push
-
Statement type: