Machine monitoring: from sensor to alert
Connect industrial sensors to Rela AI, visualize events in real time, and configure automatic alarms with task creation.
What you will achieve
By the end of this tutorial you will have a complete industrial monitoring flow: receive sensor data via webhook, visualize events, and trigger alarms that automatically create tasks. Estimated time: 25 minutes.
Prerequisites
- An active Rela AI account with dashboard access
- Access to a terminal with
curl(Linux, macOS, or Windows with WSL) - A machine agent created (or we will create one in Step 1)
Step 1: Create a machine agent
- In the sidebar, click Agents.
- Click New Agent.
- Configure:
- Name:
Pump P-101 Monitor - Type: select
Machine - Description:
Monitors vibration and temperature of pump P-101
- Name:
- Click Create.
You should see the machine agent configuration page with event sources and alarms sections.
Step 2: Add an HTTP event source
- On the agent page, go to Event Sources.
- Click New Source.
- Configure:
- Type:
HTTP Webhook - Name:
P-101 Vibration Sensor
- Type:
- Click Create.
You should see a generated webhook URL, similar to:
https://api.rela.ai/v1/events/webhook/abc123def456Step 3: Send a test event
Open your terminal and run the following curl command:
curl -X POST https://api.rela.ai/v1/events/webhook/abc123def456 \
-H "Content-Type: application/json" \
-d '{
"timestamp": "2026-03-26T10:30:00Z",
"machine_id": "P-101",
"metrics": {
"vibration_mm_s": 3.2,
"temperature_c": 67.5,
"pressure_bar": 4.1
},
"status": "running"
}'You should receive a successful response:
{
"status": "accepted",
"event_id": "evt_789xyz"
}Step 4: View the event in the history
- Return to the dashboard and go to Agents > Pump P-101 Monitor.
- Click the Events tab.
- Look for the event you just sent.
You should see the event with its timestamp, metrics (vibration: 3.2 mm/s, temperature: 67.5 C, pressure: 4.1 bar), and status "running".
Step 5: Create an alarm rule
- On the agent page, go to Alarms > Rules.
- Click New Rule.
- Configure the rule:
- Name:
High Vibration P-101 - Condition:
vibration_mm_s > 5 - Priority:
High - Action — Create task: enabled
- Task title:
Review high vibration on pump P-101 - Task priority:
urgent - Assigned to: select a technician
- Action — Notify: enabled (email and/or WhatsApp)
- Name:
- Click Save.
You should see the rule listed with status "Active" and the condition vibration_mm_s > 5 visible.
Step 6: Test the rule with a critical event
Send a new event with vibration above the threshold:
curl -X POST https://api.rela.ai/v1/events/webhook/abc123def456 \
-H "Content-Type: application/json" \
-d '{
"timestamp": "2026-03-26T11:00:00Z",
"machine_id": "P-101",
"metrics": {
"vibration_mm_s": 7.8,
"temperature_c": 72.3,
"pressure_bar": 4.0
},
"status": "running"
}'You should see the following:
- Active alarm — In Alarms a new "High Vibration P-101" alarm appears with High priority.
- Task created — On the Kanban board the task "Review high vibration on pump P-101" appears in
todostatus. - Notification sent — The assigned technician receives an email and/or WhatsApp message.
Summary
| Step | Action | Result |
|---|---|---|
| 1 | Create machine agent | Agent configured for pump P-101 |
| 2 | Add event source | Webhook URL available |
| 3 | Send test event | Event received successfully |
| 4 | View history | Event visible in dashboard |
| 5 | Create alarm rule | Active rule with condition and actions |
| 6 | Test with critical event | Alarm, task, and notification generated |
Next steps
- Configure alarm escalation to notify supervisors automatically
- Connect MQTT sources to receive data from PLCs directly
- Create a maintenance plan based on generated alarms
Extract data from PDFs and create a searchable collection
Learn to create extraction templates, process PDF documents, and enable AI-powered queries on extracted data.
Complete preventive maintenance plan
Create a preventive maintenance plan with calendar scheduling, assignments, notifications, and compliance tracking step by step.