Skip to main content

Event Service

Overview

The Event Service provides configurable monitoring and alerting capabilities for OpenDSO equipment by managing rule-based event generation. This service allows operators and applications to define custom rules that monitor device readings and operational parameters, automatically generating OpenDSO Events when specified conditions are met.

The service continuously monitors OpenFMB data published to the NATS message bus and evaluates configured rules against incoming device readings and status information. When a rule's conditions are satisfied—such as a voltage exceeding a threshold, a device state change, or any other measurable criterion—the Event Service publishes a structured RuleEvent to the NATS bus, enabling other services and applications to respond appropriately.

Key capabilities of the Event Service include:

  • Rule Definition: Create custom monitoring rules for specific equipment using operators (greater than, less than, equals, etc.) and threshold values
  • Flexible Criteria: Define rules based on any field in OpenFMB profiles using JSONPath expressions to target specific data points
  • Severity Levels: Assign severity levels to rules to categorize the importance of different events
  • Duration and Count Logic: Configure rules that trigger only after conditions persist for a specified duration or occur a certain number of times
  • Rule Management: Enable, disable, update, or delete rules dynamically without service restarts
  • Equipment-Specific Monitoring: Associate rules with specific equipment MRIDs for targeted monitoring
  • Event Publication: Automatically publish structured CloudEvents containing rule violation details to the NATS bus

Common use cases for the Event Service include:

  • Operational Alarms: Alert when equipment operates outside normal parameters (voltage, current, frequency limits)
  • State Change Notifications: Monitor switch positions, breaker status, or other device states
  • Threshold Monitoring: Track when measurements cross critical thresholds
  • Equipment Health: Detect abnormal operating conditions that may indicate equipment issues
  • Integration Triggers: Provide event data that other services can use to initiate automated responses

The API endpoints documented below allow applications to create, retrieve, update, delete, and enable/disable rules for equipment monitoring. All rule events follow the CloudEvent specification and include detailed information about the equipment, rule, and triggering condition.

For more information on rule data structures, see the Rule Param DTOs and Rule Event Protobuf documentation.

API commands

CommandsTypeResponse Object
opendso.RegionMrid.event.EquipmentMrid.rules.getRulesRequestCloudEvent DTO
data: Array(RuleEvent)
opendso.RegionMrid.event.EquipmentMrid.rules.createRequestCloudEvent DTO
data: Array(RuleEvent)
opendso.RegionMrid.event.EquipmentMrid.rules.updateRequestCloudEvent DTO
data: Array(RuleEvent)
opendso.RegionMrid.event.EquipmentMrid.rules.deleteRequestCloudEvent DTO
data: Array(RuleEvent)
opendso.RegionMrid.event.EquipmentMrid.rules.enableRequestCloudEvent DTO
data: Array(RuleEvent)
opendso.RegionMrid.event.EquipmentMrid.enableRequestCloudEvent DTO
data: Array(RuleEvent)