Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Module madsci.event_manager

MADSci Event Manager - Distributed event logging and querying.

The Event Manager provides centralized event logging, querying, and notification capabilities for MADSci-powered laboratories. It serves as the central monitoring system for tracking laboratory operations, system state changes, and real-time alerts.

Key Features

Components

Usage Example

The Event Manager is typically run as a standalone service:

.. code-block:: bash

# Run the Event Manager server
python -m madsci.event_manager.event_server

# Or use Docker Compose
docker compose up event-manager

For programmatic access, use the EventClient from madsci.client:

.. code-block:: python

from madsci.client.event_client import EventClient
from madsci.common.types.event_types import Event, EventType

client = EventClient(event_server="http://localhost:8001")

# Log events
client.log_info("System initialized successfully")

# Query events
events = client.get_events(number=50)
recent_errors = client.query_events({"log_level": {"$gte": 40}})

Configuration

The Event Manager uses environment variables with the EVENT_ prefix:

See Also

Sub-modules