A log forwarder for the IBM Z HMC
Overview
The zhmc-log-forwarder package provides a log forwarder for the IBM Z Hardware Management Console (HMC), written in pure Python.
It contains a command named zhmc_log_forwarder that collects security
logs and audit logs from the Z HMC and forwards the log entries to
various destinations, such as stdout, the local syslog, or a QRadar
service.
The command can gather log entries from the past, since a specified date and time, or since specific points such as now or all available entries. The command can in addition subscribe for notifications from the HMC about new log entries, so that it can wait for any future log entries to appear.
The log forwarder supports the following destinations:
- Standard output
- Standard error
- rsyslog server
and the following formats:
- Single line format
- Cloud Auditing Data Federation (CADF) format, represented as a JSON string
Installation
-
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 log forwarder as follows:
$ pipx install zhmc-log-forwarder
That makes the
zhmc_log_forwardercommand available in the PATH, without having to activate any virtual Python environment.
Quickstart
-
Make sure you installed the zhmc-log-forwarder package (see the previous section).
-
Create a config file for the
zhmc_log_forwardercommand. The config file specifies the targeted HMC, the desired destination for the logs, and other data.An example config file with explanations of the parameters is shown when invoking:
$ zhmc_log_forwarder --help-config-file
Additionally, an example config file is here: example_config_file.yml
Redirect that output into a file and edit that file as needed.
-
Optional: The zhmc-log-forwarder package includes a default HMC log message file. That file is used when generating CADF output format and defines how the HMC log messages are classified in the CADF output. It is possible to specify your own HMC log message file using the
log_message_fileparameter in the config file. When omitting this parameter, or when setting it tonull, the default HMC log message file included with the zhmc-log-forwarder package is used.An example HMC log message file explaining its format is shown when invoking:
$ zhmc_log_forwarder --help-log-message-file
-
Start the
zhmc_log_forwardercommand as follows:$ zhmc_log_forwarder -c CONFIGFILE
Where
CONFIGFILEis the file path of the created config file.The command will run forever (or until stopped with Ctrl-C) and will forward the log records as specified in the config file.
Documentation and Change Log
License
The zhmc-log-forwarder package is licensed under the Apache 2.0 License.
Metadata
Release files for zhmc-log-forwarder 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| zhmc_log_forwarder-1.2.0.tar.gz | 1.5 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| zhmc_log_forwarder-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.6 MB
Release files / zhmc_log_forwarder-1.2.0.tar.gz
| Download URL | zhmc_log_forwarder-1.2.0.tar.gz |
|---|---|
| Size | 1.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0a893628f1fb6a07ee886d033a91d95146ef27e85bf37628b74dd8ae552d47cc
|
|
BLAKE2b-256 checksum How to use checksums |
f81c6462799803333b783b4a3d9bc8083c68a0b28847815151fd4a2350b08e27
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 1, 2026.
Transparency logRelease files / zhmc_log_forwarder-1.2.0-py3-none-any.whl
| Download URL | zhmc_log_forwarder-1.2.0-py3-none-any.whl |
|---|---|
| Size | 31.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
051900531f062aa3282adfb4c0eb7f4e164fd77ef23ca0590f8037a658abb369
|
|
BLAKE2b-256 checksum How to use checksums |
b653de8fb7652548fbdba62176e2a30e12ca0ba5076ef24b6f7add1da31d9bf7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 1, 2026.
Transparency log