A log forwarder for the IBM Z HMC
Project description
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.
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
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_log_forwarder-1.1.0.tar.gz.
File metadata
- Download URL: zhmc_log_forwarder-1.1.0.tar.gz
- Upload date:
- Size: 1.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d2f95d6ce03aeb698d151396209165d72336f7b6f3d1b22ce2e25b1f1fb2ae7
|
|
| MD5 |
46a99a887ec8185ac3fe54bcc895d37e
|
|
| BLAKE2b-256 |
a05663a5747bf6c58c5f46149a6edc063196f007c403fc24dc9fc7eb4e79c92f
|
Provenance
The following attestation bundles were made for zhmc_log_forwarder-1.1.0.tar.gz:
Publisher:
publish.yml on zhmcclient/zhmc-log-forwarder
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zhmc_log_forwarder-1.1.0.tar.gz -
Subject digest:
9d2f95d6ce03aeb698d151396209165d72336f7b6f3d1b22ce2e25b1f1fb2ae7 - Sigstore transparency entry: 228752608
- Sigstore integration time:
-
Permalink:
zhmcclient/zhmc-log-forwarder@9b839032d47662008cd8d71d217a2ec15ad62352 -
Branch / Tag:
refs/tags/1.1.0 - Owner: https://github.com/zhmcclient
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9b839032d47662008cd8d71d217a2ec15ad62352 -
Trigger Event:
push
-
Statement type:
File details
Details for the file zhmc_log_forwarder-1.1.0-py3-none-any.whl.
File metadata
- Download URL: zhmc_log_forwarder-1.1.0-py3-none-any.whl
- Upload date:
- Size: 32.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19b9a14a03a0d6e7c7269365bf362d5bc0bda6a54e5b0f745fe7bef0a5d0f986
|
|
| MD5 |
ccb521bb073cb50b5df36c85c0de8c6f
|
|
| BLAKE2b-256 |
095eb7a5f4f1629bf58e69b056051d67b012c99061df157d7c12a2981741c571
|
Provenance
The following attestation bundles were made for zhmc_log_forwarder-1.1.0-py3-none-any.whl:
Publisher:
publish.yml on zhmcclient/zhmc-log-forwarder
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zhmc_log_forwarder-1.1.0-py3-none-any.whl -
Subject digest:
19b9a14a03a0d6e7c7269365bf362d5bc0bda6a54e5b0f745fe7bef0a5d0f986 - Sigstore transparency entry: 228752620
- Sigstore integration time:
-
Permalink:
zhmcclient/zhmc-log-forwarder@9b839032d47662008cd8d71d217a2ec15ad62352 -
Branch / Tag:
refs/tags/1.1.0 - Owner: https://github.com/zhmcclient
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9b839032d47662008cd8d71d217a2ec15ad62352 -
Trigger Event:
push
-
Statement type: