Skip to main content

A log forwarder for the IBM Z HMC

Project description

A log forwarder for the IBM Z HMC

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

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:

Installation

$ pip install zhmc-log-forwarder

This will install the package and all of its prerequisite packages into your current Python environment.

It is recommended to use a virtual Python environment, in order not to clutter up your system Python.

Quickstart

  1. Make sure you installed the zhmc-log-forwarder package (see the previous section).

  2. Create a config file for the zhmc_log_forwarder command. 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.

  3. 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_file parameter in the config file. When omitting this parameter, or when setting it to null, 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
    
  4. Start the zhmc_log_forwarder command as follows:

    $ zhmc_log_forwarder -c CONFIGFILE
    

    Where CONFIGFILE is 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

zhmc_log_forwarder-1.0.0.tar.gz (1.5 MB view details)

Uploaded Source

Built Distribution

zhmc_log_forwarder-1.0.0-py3-none-any.whl (31.9 kB view details)

Uploaded Python 3

File details

Details for the file zhmc_log_forwarder-1.0.0.tar.gz.

File metadata

  • Download URL: zhmc_log_forwarder-1.0.0.tar.gz
  • Upload date:
  • Size: 1.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for zhmc_log_forwarder-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a5fdae3877b4d8e399ade4e5f2ca78fc100ba7395a5cd2f3b8d646913ac4cb27
MD5 656f7df751e6ee91641ea4e5eab9ab81
BLAKE2b-256 3f69982ee95be22686548ab6a6b55fdb6a9b601a4264b200f925b3997d262674

See more details on using hashes here.

File details

Details for the file zhmc_log_forwarder-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for zhmc_log_forwarder-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 260bc9dfeffce1fababab221723263103e6c81b84310906ff3cf417cbe3cd3e8
MD5 0be99884f049c315b29b367d6d1feb77
BLAKE2b-256 085d34a450195d89610952268d32cc6dc89fa08965aaea1765519f65fd50aa68

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