Skip to main content

IBM Z HMC Prometheus Exporter

Project description

IBM Z HMC Prometheus Exporter

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 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

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

    $ pip install zhmc-prometheus-exporter
    
  • 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.yaml and 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 -v option. 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


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

Uploaded Source

Built Distribution

zhmc_prometheus_exporter-2.0.0-py3-none-any.whl (93.4 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for zhmc_prometheus_exporter-2.0.0.tar.gz
Algorithm Hash digest
SHA256 49d48ba23061626a79c35e1654880c14706b2ee3165800a397c5d83729485c38
MD5 7b51462485e0eabed33aef6f45aa86f5
BLAKE2b-256 4b06b1f7afa964e032c7c9cf6f332fe3551bbdc1c7ec96f4b48563e7fd06791b

See more details on using hashes here.

File details

Details for the file zhmc_prometheus_exporter-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for zhmc_prometheus_exporter-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c866948d482c5138c958789d56a8f59fb27c5d5d0d855dd6dd77b914acc67f36
MD5 8398ef050bfbf29de9d165d3c747e8a0
BLAKE2b-256 c05e8ddb32c2b8cd0a13da5476b45ed45a05a5dc2b9fd188973f4440dd90bbc5

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