Understanding events and commands
Understanding the arrangement of events and commands is essential to enhance communication, automation, and decision-making in the BMC Helix Edge ecosystem.
Read on to understand data structures and see examples of by using event and command representation to manage IoT operations flexibly and more flexibly.
Events
Events in BMC Helix Edge represent significant occurrences, states, or changes in the IoT ecosystem. They are crucial information to trigger actions, notifications, or further analysis. Events are structured data entities encapsulating details about the occurrence, its context, and relevant metadata.
The following scenarios use the example of creating a service request for an oil level going down in BMC Helix Edge:
Detecting events
- In Machine Learning (ML), if you configure a Machine Learning algorithm with the device to predict device failures, including low oil levels, the Machine Learning model continuously analyzes historical data and identifies patterns indicative of decreasing oil levels. When the ML model predicts a potential issue, BMC Helix Edge triggers an event automatically, notifying maintenance teams to create a service request.
For information about configuring ML, see Machine-Learning-functions. - In rules configuration, you set up a rule stating that if the oil level falls below a predefined threshold, BMC Helix Edge must generate a critical event. When the real-time monitoring detects this condition, BMC Helix Edge raises a corresponding event, signaling the need to create a service request for further investigation.
For information about configuring rules, see Rules-management. - When you add a new device, such as a sensor for oil level monitoring, to the network, BMC Helix Edge identifies this addition. BMC Helix Edge generates an event to inform administrators, prompting them to create a service request to configure and integrate the new device into the monitoring system.
Reading event values per details
You can access the event log levels in BMC Helix Edge to understand the details of an event. You can review specifics such as the time stamp, the type of event, for example, low oil level, and additional details that the system provides.
This information explains the service request by providing context on the oil-level issue. For information about viewing events, see Creating-dashboards-and-visualizing-data.
Raising a new event because of workflow
In a proactive maintenance workflow, BMC Helix Edge might trigger a series of actions when a low oil level event is detected. As part of this workflow, BMC Helix Edge generates a new event to indicate the initiation of the service request process. This event-driven approach ensures timely response and resolution to the identified issue. For information about creating a workflow, see Building a workflow.
Data structure of events
The BMCEvent structure provides a standardized format for representing events in BMC Helix Edge.
The following table provides a breakdown of key fields:
Parameter | Description | Example |
id | A unique identifier for the event. | 123456 |
class | Nature of the event (EVENT, ANOMALY, ALARM, COMMAND). | EVENT |
event_type | Type of event. (CreateTicket, UpdateTicket). | CreateTicket |
device_name | Device associated with the event. | Sensor1 |
name | Description of the event. | Temperature Alert |
msg | Additional details or messages related to the event. | Temperature exceeding threshold |
severity | Severity level (CRITICAL, MAJOR, MINOR). | CRITICAL |
priority | Priority assigned to the event. | High |
profile | Device profile linked to the event. | TemperatureSensorProfile |
source_node | Original node that generated the event. | NodeA |
status | Status of the event (open, closed, and so on). | open |
related_metric | Metric associated with the event. | Temperature |
threshold | The threshold value that triggered the event. | 30.0 |
actual_value | Actual numeric value of the metric. | 32.5 |
actual_value_str | Actual value in string format. | 32.5 |
unit | Unit of measurement for the metric. | Celsius |
location | Geographical location of the device. | RoomA |
version | Version information. | 1 |
additional_data | Additional contextual data in key-value pairs. | Category |
event_source | Source of the event. | Sensor |
correlation_id | Unique identifier for correlating events and actions. | C123456 |
tags | Tags associated with the event. | Temperature, Alert |
remediations | The array of remediation actions. | Type |
created | Time stamp indicating event creation. | 1636072800 |
modified | Time stamp indicating last modification. | 1636072800 |
is_new_event | Flag indicating whether the event is new or an update. | true |
is_remediation_txn | Flag indicating if that event is a remediation transaction. | false |
Example
Consider the structure of an event triggered by a sudden temperature rise in an industrial device:
"id": "12345",
"class": "EVENT",
"event_type": "TemperatureAnomaly",
"device_name": "IndustrialMachine1",
"name": "High Temperature Alert",
"msg": "Temperature exceeds safe limits.",
"severity": "CRITICAL",
"priority": "High",
"profile": "IndustrialMachineProfile",
"source_node": "SensorNode1",
"status": "open",
"related_metric": "Temperature",
"threshold": 100.0,
"actual_value": 110.5,
"unit": "Celsius",
"location": "FactoryFloor",
"version": 1,
"additional_data": {"Operator": "John Doe"},
"event_source": "Sensor",
"correlation_id": "98765",
"tags": ["TemperatureAlert", "Critical"],
"remediations": [
{"id": "R123", "type": "NotifyMaintenance", "summary": "Maintenance alert", "status": "pending", "errorMessage": ""}
],
"created": 1635840000,
"modified": 1635840300,
"is_new_event": true,
"is_remediation_txn": false
}
Commands
Commands in BMC Helix Edge are instructions or directives sent to devices in the IoT network. These commands can trigger specific actions, configurations, or device responses. They play a crucial role in orchestrating device behavior and implementing changes.
Example
In this example, the AdjustParameters command instructs IndustrialMachine1 to adjust its temperature threshold to 90.0 degrees Celsius and switch to normal operating mode.
{
"id": "Cmd-1000",
"correlation_id": "lowOilRule_Turbine04_434355",
"device_name": Turbine04",
"name": "Replenish the Oil, Create work order",
"type": "NewServiceRequest",
"problem": "Gearbox failure due to low oil",
"severity": "MEDIUM",
"event_id": "lowOilRule_Turbine04_Event100",
"status": "Open",
"command_parameters": {
"serviceID": "11903",
"Fuel Level": "20 liters",
"Reason for Request": "Gearbox failure again due to low oil",
"summary": "Order Onsite Fuel Service LowOilOpen",
"ticketType": "Work-Order"
}
}