Rules and Alarms
Create detection rules, manage alarms, and configure automated responses.
What you'll do
- Create a rule with a detector type and target tag
- Add actions (channels) for notifications
- Monitor and acknowledge alarms from the console or Operations Center
Rules
Navigate to Rules (/rules) to define conditions that monitor tag values.
Create a rule
- Click Add and select the target tag path
- Choose a detector type (see table below)
- Set type-specific params and optional duration
- Add one or more actions (Slack, email, Telegram, HTTP)
- Activate the rule
Changes propagate to the rule-worker via datahub.rule.changed — no restart needed.
Detector types (console)
| Type | When to use | Console tips |
|---|---|---|
| THRESHOLD | Fixed limits (temp, pressure, current) | Use expression + optional recover for hysteresis |
| ANOMALY_ZSCORE | Noisy signal, unknown limit | Start with zThreshold: 3, windowSec: 300 |
| RATE_OF_CHANGE | Sudden jumps or drops | Set maxDelta to your process tolerance |
| FLATLINE | Sensor stuck at one value | Increase windowSec for slow processes |
| GOLDEN_PROFILE | Deviation from known-good run | Record a baseline first (see below) |
| RUL | Trend toward a failure limit | Set limit and horizonSec for early warning |
See Rules, alarms, and actions for parameter details.
Rule state
Each active rule has a RuleState row: NORMAL, PENDING, or TRIGGERED. View state on the rule detail page.
Alarms
Alarms (/alarms) lists active and historical alarm events.
Acknowledge an alarm
- Open the alarm from the list
- Click Acknowledge — requires
alarms.acknowledgepermission - Add an optional comment
Acknowledged alarms remain visible in history for audit purposes.
Alarm workflow
Rule condition met → Alarm created (ACTIVE)
→ Actions dispatched
Operator acknowledges → Status updated
Condition clears → Alarm may auto-clear depending on rule configThe Operations Center (/operations) shows a live alarm feed — see Operations Center.
Baselines (golden profile)
Baselines (/baselines) record a known-good telemetry envelope (p05–p95 percentiles) for a tag over a historical time window.
- Select plant, tag, and history window
- Save the baseline record
- Create a GOLDEN_PROFILE rule referencing that tag — live values outside the envelope (plus
marginPct) trigger an alarm
Requires maintenance permissions (baselines share the maintenance resource).
This is separate from maintenance work orders — baselines are for anomaly detection, not CMMS measurements.
Tips
- Start with the demo rule to verify the action pipeline works
- Use duration / PENDING state to avoid flapping on noisy signals
- Windowed detectors use RAM per tag — avoid tiny
windowSecon kHz tags - Test HTTP actions against the webhook sink:
GET /api/webhooks/test/log
