Skip to main content

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 SOAR 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

eventus_integration-1.1.4.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

eventus_integration-1.1.4-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file eventus_integration-1.1.4.tar.gz.

File metadata

  • Download URL: eventus_integration-1.1.4.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

Hashes for eventus_integration-1.1.4.tar.gz
Algorithm Hash digest
SHA256 67a3e5a86de7396b347cf356fe789e574b3abdae50c9f01c649179b3d4edce89
MD5 01490fdc128e6ff5a41e412a6fba7789
BLAKE2b-256 495b55fc882fa31b1930b6787ad38bdf6a3c72eb680f2cbc4da5e4e5f189f6b9

See more details on using hashes here.

File details

Details for the file eventus_integration-1.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for eventus_integration-1.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 02c10d020d613f8d5e2a3dc48b961b0b80e32076d75f6096e13cd772dcf0e84e
MD5 c9b92c7c2a27cf4259b08a69b23ac098
BLAKE2b-256 e0e56d24900e78dfeed51c125cc20372abe7bc5746e9d8d56622268d55ac821a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page