Alert Management & Notifications
Cockpit monitor rules check the health of your servers and VMs in real-time, automatically triggering warning messages to administrators if something goes wrong.
How Alerts Work 🚨
💡 Analogy: Car Dashboard Warning Lights
Think of Cockpit's alert system like the sensors and dashboard symbols in a modern car:
- Detection (Sensors): Cockpit's background checker acts like temperature and tire pressure sensors, constantly reading physical metrics (CPU load, temperature, disk usage) and VM statuses.
- Evaluation (Threshold Rules): The car's computer checks if a reading is unsafe. For example: "If the CPU stays above 90% for more than 5 minutes, trigger a warning."
- Dispatch (The Dashboard Chime): The system decides how to warn you. It turns on a dashboard light or sends an alarm (sends an email alert to the sysadmin or triggers an network alert).
Alarm Severity Levels
Alerts are color-coded into four severity levels to help you prioritize issues:
- Info (🟢 Green / Informational): Standard updates showing that things are working as expected (e.g., a backup finished successfully, or database sync is complete).
- Warning (🟡 Yellow / Warning): Non-critical events that you should review soon (e.g., a hard disk is 85% full, or a server is responding slightly slower than usual).
- Critical (🔴 Red / Critical): Serious problems that need immediate attention (e.g., a physical host disconnected, or a virtual machine crashed).
- Fatal (💥 Dark Red / Fatal): Major system failures that cause total outages (e.g., a storage pool went offline, or a server lost power).
Setting Up Notifications
You can configure Cockpit to send alerts to your team using Email (SMTP) or Network Traps (SNMP).
1. Email Notifications (SMTP)
To have Cockpit email you when a warning triggers:
- Log into Cockpit as an administrator.
- Go to Settings > Notifications > Email.
- Fill in your company's mail server details:
- SMTP Host: The address of your mail server (e.g.,
smtp.corp.awan.io). - Port: Usually
587(secure TLS) or465(SSL). - Authentication: The username and password of the sender email account.
- Sender Address: The email address the alerts will appear to come from (e.g.,
alerts-noreply@corp.awan.io).
- SMTP Host: The address of your mail server (e.g.,
- Set up Recipient Rules to choose who gets notified for each level of alert (e.g., send Warnings to the helpdesk, but send Critical/Fatal alerts to the system administrators' mobile alerts).
2. Network Alerts (SNMP Traps)
If your company uses a central network monitoring dashboard (an NMS like Zabbix or PRTG) to watch all office hardware:
- Go to Settings > Notifications > SNMP.
- Define where to send the alerts (the SNMP Target):
- Target Host: The IP address of your monitoring server.
- Port: Usually
162(the standard SNMP trap port). - Community String: A passcode to authorize the alert (usually
publicor a custom string). - SNMP Version: Choose v2c or v3 (which includes encryption).