Overview
The Alert Catalog defines:- Alert Types: Categories of alerts (THRESHOLD_EXCEEDED, SENSOR_OFFLINE, ACTUATOR_FAILURE, SYSTEM_ERROR)
- Alert Severities: Priority levels (INFO, WARNING, ERROR, CRITICAL) with action requirements
Alert Types
Get All Alert Types
Response
Array of alert type objects
System Alert TypesCommon alert types with predefined IDs:
- ID 1 = THRESHOLD_EXCEEDED (sensor value out of range)
- ID 2 = SENSOR_OFFLINE (sensor not responding)
- ID 3 = ACTUATOR_FAILURE (actuator malfunction)
- ID 4 = SYSTEM_ERROR (system-level issues)
Get Alert Type by ID
Path Parameters
Alert type ID
Response
Create Alert Type
Request Body
Alert type name (max 30 characters, must be unique)
Description of the alert type
Response
Update Alert Type
Path Parameters
Alert type ID to update
Request Body
All fields are optional. Only provided fields will be updated.New alert type name (max 30 characters, must be unique)
New description
Response
Same structure as “Create Alert Type” with updated values.Delete Alert Type
Path Parameters
Alert type ID to delete
Response
Alert Severities
Get All Alert Severities
Response
Array of alert severity objects
System Severity LevelsStandard severity levels with predefined IDs:
- ID 1 = INFO (level 1, blue, no action required)
- ID 2 = WARNING (level 2, orange, review recommended)
- ID 3 = ERROR (level 3, dark orange, action required)
- ID 4 = CRITICAL (level 4, red, immediate action required)
Get Critical Severities
requiresAction = true).
Response
Get Alert Severity by ID
Path Parameters
Alert severity ID
Response
Create Alert Severity
Request Body
Severity name (max 20 characters, must be unique)
Numeric level for sorting (1=lowest, higher=more severe, must be positive)
Description of the severity level
Hex color code (format:
#RRGGBB, e.g., “#FF0000”)Whether immediate action is required
Minutes to wait before sending notification (minimum 0)
Response
Update Alert Severity
Path Parameters
Alert severity ID to update
Request Body
All fields are optional. Only provided fields will be updated.New severity name (max 20 characters, must be unique)
New numeric level (must be positive)
New description
New hex color code
New action requirement status
New notification delay (minimum 0)
Response
Same structure as “Create Alert Severity” with updated values.Delete Alert Severity
Path Parameters
Alert severity ID to delete
Response
Alert Configuration Workflow
Notification Delay Explained
How Notification Delays Work
How Notification Delays Work
Purpose: Prevent alert fatigue by delaying notifications for less critical issues.Behavior:
Example Scenario:Implementation:
notificationDelayMinutes = 0: Notify immediatelynotificationDelayMinutes > 0: Wait specified minutes before sending notification- If alert is resolved during delay period, no notification is sent
| Severity | Delay | Reason |
|---|---|---|
| INFO | 60 min | Batch informational alerts hourly |
| WARNING | 15 min | Give system time to self-correct |
| ERROR | 5 min | Brief delay to avoid transient errors |
| CRITICAL | 0 min | Immediate notification required |
Integration Examples
Error Codes
| Status Code | Description | Resolution |
|---|---|---|
| 200 OK | Request successful | - |
| 201 Created | Resource created successfully | - |
| 204 No Content | Resource deleted successfully | - |
| 400 Bad Request | Invalid input (duplicate name, invalid color, invalid level) | Check error message for details |
| 404 Not Found | Resource not found with specified ID | Verify the ID exists |
| 409 Conflict | Cannot delete resource due to dependencies (alerts using type/severity) | Delete dependent alerts first |
Best Practices
Alert Type Naming
Alert Type Naming
Use descriptive, action-oriented names:Good:
THRESHOLD_EXCEEDEDSENSOR_OFFLINENUTRIENT_IMBALANCEMAINTENANCE_REQUIRED
ALERT_1PROBLEMISSUEERROR_TYPE
- Use UPPER_SNAKE_CASE
- Start with subject (SENSOR, ACTUATOR, SYSTEM)
- End with action/state (OFFLINE, FAILURE, EXCEEDED)
Severity Level Design
Severity Level Design
Standard 4-Level System (Recommended):
- INFO (level 1): Informational, no action needed
- WARNING (level 2): Potential issue, review recommended
- ERROR (level 3): Issue occurred, action needed soon
- CRITICAL (level 4): Urgent issue, immediate action required
- INFO
- LOW
- MEDIUM
- HIGH
- CRITICAL
- Keep levels consistent across system
- Use
requiresAction=trueonly for ERROR and above - Set appropriate notification delays (avoid alert fatigue)
- Choose colors that are colorblind-friendly
Notification Delay Strategy
Notification Delay Strategy
Recommended Delays by Severity:
Considerations:
| Severity | Delay | Rationale |
|---|---|---|
| INFO | 60-120 min | Batch non-critical updates |
| WARNING | 15-30 min | Allow time for auto-recovery |
| ERROR | 5 min | Brief delay to filter transients |
| CRITICAL | 0 min | Immediate notification |
- Longer delays reduce notification fatigue
- Too long delays may miss critical issues
- Allow auto-resolution during delay period
- Document delay strategy in alert type description
Color Accessibility
Color Accessibility
Use colorblind-friendly colors:
Avoid:
| Severity | Color | Hex | Accessible |
|---|---|---|---|
| INFO | Blue | #0066FF | ✅ Good contrast |
| WARNING | Orange | #FFA500 | ✅ Distinct from red |
| ERROR | Dark Orange | #FF6600 | ✅ Between warning and critical |
| CRITICAL | Red | #FF0000 | ✅ Universal danger signal |
- Pure green/red combinations (deuteranopia)
- Low contrast colors (readability)
- Similar shades for different severities