The Eventlog Module
The Eventlog module provides access to the Ingenuity event log API for querying and writing events.
What This Module Does
Section titled “What This Module Does”- Runs structured event queries
- Filters events by source, type, or ID
- Deletes events by ID
- Pushes events into the event log
Key Entry Point
Section titled “Key Entry Point”Use get_eventlog() to create a client:
from eigeningenuity import get_eventlog, EigenServer
ei = EigenServer("https://demo.eigen.co/")log = get_eventlog(ei)Common Operations
Section titled “Common Operations”Query Events
Section titled “Query Events”query = { "start": "yesterday", "end": "now", "severities": ["INFO", "WARNING"],}results = log.getEvents(query)Filter by Source or Type
Section titled “Filter by Source or Type”by_source = log.getEventsBySource("ingenuity-service")by_type = log.getEventsByType("DataTagThresholdCheck")Push Events
Section titled “Push Events”log.pushToEventlog({"timestamp": "2024-01-01T00:00:00Z", "message": "Hello"})Authentication
Section titled “Authentication”For secured environments, configure Azure auth before creating the client. See Authentication.