Alert Connector
Overview
Section titled “Overview”The Alert connector sends notifications when conditions are met.
Connector Type: MeddleAlert
Notification Types: Email
Configuration
Section titled “Configuration”{ "type": "MeddleAlert", "config": { "name": "High Temperature Alert", "condition": "temperature > 80", "minDuration": 10, "cooldown": 300, "notification": { "type": "Email", "smtpHost": "smtp.example.com", "smtpPort": 587, "smtpUser": "alerts@example.com", "smtpPass": "password", "fromEmail": "alerts@example.com", "toEmails": ["operator@example.com", "manager@example.com"], "subject": "Temperature Alert", "body": "Temperature exceeded threshold" } }}Configuration Parameters
Section titled “Configuration Parameters”- name: Alert name for identification
- condition: MXL expression for trigger condition
- minDuration: Minimum seconds condition must be true before alerting
- cooldown: Seconds to wait before sending another alert
- notification: Notification configuration
Email Notification
Section titled “Email Notification”- type:
"Email" - smtpHost: SMTP server hostname
- smtpPort: SMTP server port (typically 587 or 465)
- smtpUser: SMTP username
- smtpPass: SMTP password
- fromEmail: Sender email address
- toEmails: Array of recipient email addresses
- subject: Email subject
- body: Email body text
MXL Conditions
Section titled “MXL Conditions”Use MXL expressions for conditions:
temperature > 80pressure < 10temperature > 80 && pressure < 10humidity > 60 || temperature > 25status == "error"See MXL Reference for complete syntax.
Min Duration
Section titled “Min Duration”Prevents false alarms by requiring condition to be true for a minimum duration:
{ "minDuration": 10}Condition must be true for 10 seconds before alert is sent.
Cooldown
Section titled “Cooldown”Prevents alert spam by waiting between notifications:
{ "cooldown": 300}After sending an alert, waits 300 seconds (5 minutes) before sending another.
Use Cases
Section titled “Use Cases”1. Temperature Monitoring
Section titled “1. Temperature Monitoring”{ "type": "MeddleAlert", "config": { "name": "Freezer Temperature Alert", "condition": "temperature > -10", "minDuration": 30, "cooldown": 600, "notification": { "type": "Email", "smtpHost": "smtp.gmail.com", "smtpPort": 587, "smtpUser": "alerts@company.com", "smtpPass": "app-password", "fromEmail": "alerts@company.com", "toEmails": ["maintenance@company.com"], "subject": "Freezer Temperature Warning", "body": "Freezer temperature is above -10°C" } }}2. Equipment Failure
Section titled “2. Equipment Failure”{ "type": "MeddleAlert", "config": { "name": "Machine Stopped", "condition": "status == \"stopped\" && runtime > 0", "minDuration": 60, "cooldown": 1800, "notification": { "type": "Email", "smtpHost": "smtp.example.com", "smtpPort": 587, "smtpUser": "alerts@factory.com", "smtpPass": "password", "fromEmail": "alerts@factory.com", "toEmails": ["supervisor@factory.com", "maintenance@factory.com"], "subject": "Machine Stopped Alert", "body": "Production machine has stopped unexpectedly" } }}3. Multiple Conditions
Section titled “3. Multiple Conditions”{ "type": "MeddleAlert", "config": { "name": "Critical Process Alert", "condition": "temperature > 100 || pressure > 150 || vibration > 5", "minDuration": 5, "cooldown": 300, "notification": { "type": "Email", "smtpHost": "smtp.example.com", "smtpPort": 587, "smtpUser": "critical@factory.com", "smtpPass": "password", "fromEmail": "critical@factory.com", "toEmails": ["emergency@factory.com"], "subject": "CRITICAL: Process Alert", "body": "Critical process parameters exceeded" } }}SMTP Configuration
Section titled “SMTP Configuration”{ "smtpHost": "smtp.gmail.com", "smtpPort": 587, "smtpUser": "your-email@gmail.com", "smtpPass": "app-specific-password"}Note: Use App Passwords for Gmail.
Office 365
Section titled “Office 365”{ "smtpHost": "smtp.office365.com", "smtpPort": 587, "smtpUser": "your-email@company.com", "smtpPass": "your-password"}Custom SMTP
Section titled “Custom SMTP”{ "smtpHost": "mail.example.com", "smtpPort": 587, "smtpUser": "alerts@example.com", "smtpPass": "password"}Best Practices
Section titled “Best Practices”- Set appropriate minDuration - Avoid false alarms
- Use reasonable cooldown - Prevent alert fatigue
- Test SMTP settings - Verify emails are delivered
- Use descriptive names - Identify alerts easily
- Include context in body - Make alerts actionable
Troubleshooting
Section titled “Troubleshooting”Emails Not Sending
Section titled “Emails Not Sending”- Verify SMTP credentials
- Check SMTP host and port
- Ensure firewall allows SMTP traffic
- Test SMTP connection separately
- Check spam folder
Too Many Alerts
Section titled “Too Many Alerts”- Increase
minDuration - Increase
cooldown - Refine condition to be more specific
Missing Alerts
Section titled “Missing Alerts”- Decrease
minDuration - Check condition logic
- Verify data is flowing through connector
Related Connectors
Section titled “Related Connectors”- Trigger - Conditional logic
- Anomaly Detection - ML-based detection
- MXL Reference - Expression syntax