Get alerted when CPU, memory or disk run hot
A server monitor is a rule such as "tell me when CPU has been at 90 per cent or more for five minutes". SrvYard checks every monitor each time it takes a sample (once a minute) and sends a notification when the rule starts to hold, and another when the server is back to normal. You decide who is told.
This article covers creating and editing monitors, the exact way a monitor decides to alert and to recover, how to switch one off or mute it, and the personal switches that silence notifications for you alone. Alerts for scheduled tasks that did not run are a different feature: see Heartbeats and uptime checks.
Before you begin
- A plan with server monitoring. On a plan without it, SrvYard refuses to add or change monitors and says "Server monitors are not included in your plan". See Plans and limits compared.
- Permission to change the server. Anyone who can see a server can see its monitors, but only members who can update the server can add, edit, mute, disable or delete them.
- Metrics flowing. Monitors use the same samples as the charts, so the server must be in the Ready state. See Server metrics and charts.
- Somewhere for the alert to go. Each monitor needs at least one recipient: a member of the organisation, an email address, or both. To send alerts to Slack or Discord as well, set up a channel first: see Notification channels.
1. Find the Monitors card
Open the server, choose Monitoring, and scroll below the charts to Monitors.
- New monitor. Opens the panel for a new rule. A server can have at most 20 monitors.
- A monitor row. The first line is the metric (Used disk space, CPU usage or Used memory) and the line under it is the rule, for example "≥ 85% for 5 minutes". Last value shows the newest reading and how long the monitor has been in its current state. Notifies counts the people who are told.
- State. OK means the rule does not hold. Alert means it has held for the whole duration. Waiting for data is shown for a new or just-changed monitor until the next sample has been checked. A muted monitor also carries a Muted label.
- Monitor actions. The three-dot menu: see step 3.
2. Create a monitor
Press New monitor. A panel slides in from the right with the title New server monitor.
- Metric. CPU usage, Used memory or Used disk space. These are the three figures a monitor can watch. Memory and disk are the share of the total that is in use.
- Condition. Greater than or equal to (the usual choice, "too much") or Less than or equal to (for example, a CPU that has dropped to nothing).
- Threshold. A percentage from 1 to 100. The panel starts at 90.
- For at least. How many minutes the condition must hold without a break, from 1 to 1440 (one day). The panel starts at 5.
- Notify members. Tick the people who should be told. You are ticked by default. Only active members of the organisation are listed, and a person who has since left stops receiving alerts.
- Other email addresses (optional). Up to five addresses, separated by commas, for people who are not members, such as an on-call mailbox.
- Create monitor. Saves the rule. It starts checking with the next sample.
If you leave both the members and the email list empty, SrvYard asks you to choose at least one person or address.
Do not set the duration to 1 minute for CPU. A single busy minute (a deployment, a backup) is normal. Five to fifteen minutes catches real trouble without waking anyone for a spike. For disk, which only changes slowly, a longer duration does no harm.
How a monitor decides
- Alert. A monitor moves to Alert when every sample in the last "for at least" minutes breaches the threshold, and the samples cover that whole period. A server that is only sampled now and then, or that was unreachable for part of the window, does not alert on partial evidence.
- Recovery. The monitor goes back to OK only when no sample in the last few minutes breaches. The look-back is the monitor's duration, capped at five minutes. This stops a monitor from flapping when one good reading appears inside a noisy stretch.
- Gaps. Missing samples never change a state. If the server stops answering while a monitor is in alert, it stays in alert.
- Notifications. You get one message when the monitor goes into alert and one when it recovers, not one every minute. The first time a monitor reports OK nothing is sent. Messages go by email and as an in-app notification, depending on each person's own settings (see step 4).
- Changes start over. If you change the metric, condition, threshold or duration, the monitor forgets its old state and shows Waiting for data until the next sample.
3. Edit, switch off or mute a monitor
Open the three-dot menu at the end of a row.
- Edit. Opens the same panel with the current values. Change what you need and press Save changes.
- Disable (or Enable). Stops the checks completely. Enabling it again starts from a clean state. Use it while you do planned work that you know will push a metric over the line.
- Mute (or Unmute). The monitor keeps checking and keeps its state, but sends no notifications. Use it for a known problem you are already fixing. The menu also has Delete, which removes the monitor after a confirmation.
Muting a monitor silences it for everyone it notifies. To silence things for yourself only, use the switches in the next step.
4. Silence notifications for yourself
Two personal switches leave the monitors themselves untouched. They only decide what reaches you.
The first is on the server's Overview tab, in the Notifications card.
- Mute this server and its sites. Stops your own email and in-app notifications about this server and its sites. Nobody else is affected, and channels that are set up in a site's own settings keep working.
The second is your own notification settings, in your account settings, under Notifications.
- Enable email notifications. Turning this off silences every email to you for the chosen organisation.
- Enable in-app notifications. Turning this off silences the bell for that organisation.
- Muted servers. The same mutes as the server switch, in one list. Pick a server to mute it, or remove it to unmute.
- Server monitor alert. The row in the table that controls monitor messages, with a switch for Email and one for In-app. Other events such as Heartbeat missed and Backup failed have their own rows.
Members who may manage notifications can set the defaults everyone starts with under Organization settings > Notifications: see Notification channels.
Troubleshooting
- "Server monitors are not included in your plan." Your organisation's owner plan has no server monitoring. Upgrade, or read Plans and limits compared to see which plans include it.
- "A server can have at most 20 monitors." Delete or merge some. Two rules for the same metric with different thresholds (a warning at 80 and a problem at 95) are fine, but twenty is the limit.
- "Choose at least one person or email address to notify." Tick a member or type an address before saving.
- A monitor stays on "Waiting for data". It has been created or changed and has not been evaluated yet, or the server is not producing samples. Check the freshness badge on the Monitoring tab.
- The metric is over the threshold but no alert came. The condition has to hold for the whole duration, with samples covering the entire period. Also check whether the monitor shows Muted, whether your own email or in-app switch is off, and whether the server is muted for you.
- I get an alert but the number looks normal now. The alert was sent when the condition had held for the whole duration. The value on the card is the newest sample, and the monitor only recovers after it has stayed clear for the recovery period.
Related
- Server metrics and charts: see what normal looks like before you choose a threshold.
- Notification channels: send alerts to Slack, Discord, Telegram or a shared inbox.
- Heartbeats and uptime checks: get told when a scheduled task does not run.
- Disk full, out of memory or a slow server: what to do when an alert fires.