A Python library for Eventus integrations: ESDL TCP sender, MongoDB logging, Teams notifications, retry logic, and multi-tenant ingestion.
Project description
Eventus Integration
A lightweight Python module designed for Eventus SIEM Integrations.
This library provides a unified framework for:
- 🚀 Sending logs to ESDL over TCP (with retries + backoff)
- 🗄️ MongoDB error logging with automatic retry window re-processing
- 🔁 Re-run failed ingestion windows (except 401/403)
- 📨 Microsoft Teams alert notifications
- 🔐 Eventus Integration API wrapper using Bearer token
- 👥 Multi-tenant threaded ingestion engine
- 🔧 Auto environment configuration loader (
.env) - 📦 Log flattening & structured JSON output
✨ Features
1. TCP Log Delivery (ESDL)
- Automatic socket creation + retry
- Exponential backoff
- Newline-framed JSON messages
- Error notification on Teams
2. MongoDB Logging
- Inserts & updates failure logs
- Prevents overwriting status codes
- Supports retrying failed windows
3. Teams Webhook Alerts
- Push error messages directly to Teams
- Includes tenant + module metadata
4. Integration API Helper
Simple wrapper to call:
/api/integration-data/product
with filters for:
- product name
- product type
- active/disabled customers
- services
- exact or fuzzy match
5. Multi-Tenant Execution
Runs ingestion per tenant using ThreadPoolExecutor.
📦 Installation
From PyPI (once published)
pip install eventus-integration
⚙️ Environment Setup
Before using this library, call:
from eventus_integration import configure_from_env
configure_from_env()
Your .env file must include:
MONGODB_URL=
ESDL_HOST=
ESDL_PORT=
Database=
logs_count_collection=
error_logs_collection=
BASE_URL=
AUTH_TOKEN=
webhook_url=
JENKINS_URL= # optional
JENKINS_USER= # optional
JENKINS_API_TOKEN= # optional
TRIGGER_TOKEN= # optional
📚 Public Functions
The following functions are available to import:
__all__ = [
"configure_from_env",
"store_error_in_mongo",
"process_failed_windows",
"logs_count",
"send_data_to_esdl",
"get_integration_by_product",
"Get_tenant_details",
"round_time",
"trigger_jenkins_job"
]
Optional:
If you do not want to store errors in MongoDB or retry them,
you may directly call:
build_error_and_send()
🧩 Example Usage
from eventus_integration import (
configure_from_env,
Get_tenant_details,
get_integration_by_product,
)
configure_from_env()
def fetch_logs(label_details, api_details):
# your ingestion logic here
pass
Get_tenant_details(
tenants,
fetch_logs,
get_integration_by_product,
product_name="aws_waf"
)
📝 License
Internal Eventus Security module.
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 eventus_integration-1.1.5.tar.gz.
File metadata
- Download URL: eventus_integration-1.1.5.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
867e98dca1f17eaeb069ecf0f35e19e545646b600fe766841bf575d6c49b6261
|
|
| MD5 |
d2e9fc1264be026c2a56f7d7aeb98f71
|
|
| BLAKE2b-256 |
45e567ee45d90d75393f14d02e5c84743085b4de73f317b0986f6de59e5fa511
|
File details
Details for the file eventus_integration-1.1.5-py3-none-any.whl.
File metadata
- Download URL: eventus_integration-1.1.5-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7bb003526c329a25c204c3a74d06e92d17b7949ce53fc4ec9893155ab7a72489
|
|
| MD5 |
f6b2bc641390d3dfb726bc8ffa32fbf9
|
|
| BLAKE2b-256 |
b11aecef70d046bc503a7fe6d3fb2968227605f0e9469d0fc71835d039678e00
|