This project has been archived by its maintainers, and is no longer receiving any updates.
SecOps Log Hammer
A Python tool for generating and ingesting synthetic logs into Chronicle.
Description
SecOps Log Hammer is designed for testing and development purposes. It can generate realistic security logs in various formats (WINEVTLOG, OKTA, AZURE_AD, GCP_CLOUDAUDIT, CS_EDR) and ingest them into Chronicle.
Features
- Generate realistic security log data
- Support for multiple log formats
- Configurable log volume (by GB or MB)
- Progress tracking
- Automatic forwarder management
- Support for production, staging, and development environments
Installation
pip install secops-log-hammer
Requirements
- Python 3.7 or later
- Google Cloud authentication credentials (either Application Default Credentials or a service account key file)
- Chronicle instance access
Authentication
Log Hammer supports two authentication methods:
Application Default Credentials (ADC) - Recommended
By default, Log Hammer uses Application Default Credentials. To set up ADC:
gcloud auth application-default login
This will authenticate your account and store credentials locally. No additional parameters are needed when running Log Hammer.
Service Account Key
Alternatively, you can use a service account key file:
- Create a service account with appropriate Chronicle permissions
- Generate a JSON key file for the service account
- Provide the path to the key file using the
--service-account-pathoption
Usage
log-hammer --customer_id YOUR_CUSTOMER_ID --project_id YOUR_PROJECT_ID [--region REGION] [--gb 0.1 | --mb 100]
The CLI supports both underscore and dash formats for arguments (e.g., --customer_id or --customer-id).
Required Arguments
--customer_id/--customer-id: Chronicle Customer ID--project_id/--project-id: Google Cloud Project ID
Log Size Options (specify one)
--gigabytes/--gb: Approximate gigabytes of raw logs to generate and ingest--megabytes/--mb: Approximate megabytes of raw logs to generate and ingest
If neither option is specified, defaults to 100 MB.
Note: You can use the short forms --gb and --mb instead of --gigabytes and --megabytes for convenience.
Other Options
--region: Chronicle API region (e.g., us, europe, asia-southeast1). Special values:staging: Use the Chronicle staging environmentdev: Use the Chronicle development/autopush environment- Default: "us"
--service_account_path/--service-account-path: Path to GCP service account JSON key file for authentication. If not provided, Application Default Credentials (ADC) will be used.--forwarder_display_name/--forwarder-display-name: Display name for the Chronicle forwarder to be created/used (default: "PythonLogIngestScriptForwarder").--namespace: Optional asset namespace for the logs. May be required for some log types.--log_types/--log-types: Comma-separated list of log types to generate. If empty, all available types will be used.--labels: Optional labels to attach to logs in key=value,key2=value2 format or as JSON object.
Examples
Generate and ingest 0.5 GB of logs into Chronicle in the US region:
log-hammer --customer-id my-customer-id --project-id my-gcp-project --gb 0.5
Generate and ingest 100 MB of logs:
log-hammer --customer-id my-customer-id --project-id my-gcp-project --mb 100
Use a service account key for authentication:
log-hammer --customer-id my-customer-id --project-id my-gcp-project --mb 50 --service-account-path /path/to/service-account-key.json
Generate only specific log types:
log-hammer --customer-id my-customer-id --project-id my-gcp-project --log-types WINEVTLOG,OKTA
Generate logs for a staging environment:
log-hammer --customer-id my-customer-id --project-id my-gcp-project --region staging --mb 10
Generate logs for a development/autopush environment:
log-hammer --customer-id my-customer-id --project-id my-gcp-project --region dev --mb 10
License
Apache 2.0
Metadata
Release files for secops-log-hammer 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 | Provenance | |
|---|---|---|---|---|
| secops_log_hammer-1.2.0.tar.gz | 44.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| secops_log_hammer-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 91.0 kB
Release files / secops_log_hammer-1.2.0.tar.gz
| Download URL | secops_log_hammer-1.2.0.tar.gz |
|---|---|
| Size | 44.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9defe435600bcb9bd7551f6733d1b39b43b9fbd7e9ec3e35d4f48efce7dfc601
|
|
BLAKE2b-256 checksum How to use checksums |
82a0fe6d91063612f946e8956f9a5e20b2070437f1b8235ee30993fc2f5bac73
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / secops_log_hammer-1.2.0-py3-none-any.whl
| Download URL | secops_log_hammer-1.2.0-py3-none-any.whl |
|---|---|
| Size | 46.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
209b98ac59ce4affd5f511147438b1d72e1eb6f9bd96f2816c32eeebf5509073
|
|
BLAKE2b-256 checksum How to use checksums |
53aff0c8a503479aafe5ac42e3ef1bc28c477c26404b4658f6cb47814c8e00b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Security for secops-log-hammer 1.2.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.