DB-유

Monitoring Synology Health: Resource Monitor and Notifications

· synology, monitoring, notifications

The NAS that's been running quietly for two years is the one most likely to be degraded without anyone knowing. I've walked into that situation: a failed disk nobody noticed, a volume nearly full, a dead fan. DSM notices all of it. It just needs to be told where to send the message, and someone has to read it.

Here's the built-in monitoring I turn on for DSM 6.2: Resource Monitor for right now, notifications for what needs attention, and scheduled S.M.A.R.T. tests. You'll want an SMTP account for the NAS to send from. A dedicated mailbox beats a personal one, though Gmail works with an app password if the account has 2-step verification. DS finder on a phone is optional, for push.

Email first

Control Panel → Notification → Email → tick "Enable email notifications":

Service provider:   Custom SMTP server
SMTP server:        smtp.example.com
SMTP port:          587
Secure connection:  STARTTLS
Authentication:     on, user nas@example.com
Sender name:        NAS-Office
Sender email:       nas@example.com
Recipients:         admin@example.com; ops@example.com
Subject prefix:     [NAS-Office]

Click Send a test email and wait for it. The subject prefix is what lets a mail filter route these into a folder or a ticket queue; if you manage several units, give each a distinct prefix.

Push and SMS

Notification → Push Service → "Enable notifications via Synology's push service". Pair DS finder on the phone and it appears in the list. Push is what I use for the small set of events that need attention within minutes: volume crashed, disk failed, overheating, UPS on battery.

SMS works through a provider gateway with an HTTP API; Notification → SMS → Add SMS service provider and paste the provider's URL template. Most people no longer need it now that push exists, but it is the only channel that works when the internet link itself is down and the phone is on mobile data.

Deciding which events go where

Notification → Advanced lists every event with checkboxes per channel. The default sends nearly everything by email, which trains you to ignore the mail. I cut it down hard:

  • Push and email: Storage Pool degraded or crashed, Volume crashed, Disk failed or reallocated sector count increased, System overheating, Fan failed, UPS events, Login failure lockout by Auto Block.
  • Email only: Volume running out of space, DSM update available, Hyper Backup task failed, Snapshot Replication failed, S.M.A.R.T. test failed, Package update available.
  • Nothing: successful backups, successful scheduled tasks, external device connected. Look at those in the log when you need them.

The "Volume is running out of space" threshold is under Storage Manager → Volume → Configure; set it to 10 percent rather than the default 5, because a Btrfs volume that fills completely is much harder to recover than one with a little headroom.

S.M.A.R.T. tests

Storage Manager → HDD/SSD → Test Scheduler → Create:

Quick test:     weekly, Sunday 01:00, all drives
Extended test:  monthly, first Saturday 02:00, all drives

Extended tests read the whole surface and take hours per drive on large disks; they run in the background but do slow the unit down, so keep them off business hours. A failing extended test fires the S.M.A.R.T. notification configured above.

Enable the bad sector warning too: HDD/SSD → Settings → tick "Enable bad sector warning" with a threshold of 50. A drive whose reallocated count climbs past that is on its way out even if S.M.A.R.T. still says "Normal".

Resource Monitor for right now

Resource Monitor from the main menu has four tabs and a Performance history if you enable it under Settings → "Enable usage history". Turn that on, it's off by default and I always regret finding out late. With it, you can go back a week to see what was happening when a user complained the NAS was slow.

  • Performance → CPU and Memory: sustained CPU over 80 percent on a Celeron is usually Docker or indexing (synoindexd) or a Btrfs scrub.
  • Performance → Disk: utilisation per drive; one drive at 100 percent while the others idle points at a drive with retries.
  • Performance → Volume: IOPS and throughput per volume.
  • Process: sort by CPU or memory; right-click to end a runaway process.
  • Connections: who is connected over SMB, AFP, NFS and FTP. Useful when a transfer is saturating the network.

From the shell the same numbers come from top, iostat -x 5 (from the SynoCli Monitor Tools community package) and cat /proc/loadavg.

A weekly heartbeat report

Control Panel → Task Scheduler → Create → Scheduled Task → User-defined script, running weekly as root with "Send run details by email" ticked, gives you a heartbeat message with whatever you want in it:

#!/bin/sh
echo "== Storage =="; cat /proc/mdstat | grep -E 'md|blocks'
echo "== Volumes =="; df -h | grep volume
echo "== Temperatures =="; for d in /dev/sd?; do echo -n "$d "; smartctl -A $d | awk '/Temperature_Celsius/ {print $10}'; done
echo "== Uptime =="; uptime

If the weekly report stops arriving, the NAS or its mail path is broken, which is itself the useful signal.

Checking it all fires

  • The test email arrives and lands where the filter expects it.
  • Trigger a real event safely: pull the network cable from LAN 2 if you have a bond, or unplug the UPS from the wall for a moment. A push and an email should follow within a minute.
  • After the first weekly quick test, HDD/SSD → Health Info → S.M.A.R.T. → History shows the result per drive.
  • Resource Monitor → Performance → Settings shows history enabled and a graph covering the past days.

Notes

  • "Failed to send test email" with Gmail: the account has 2-step verification and you used the normal password. Generate an app password in the Google account security settings, or use a real SMTP relay.
  • No notifications arrive but the test email works. The events are unticked under Notification → Advanced for the email column; the test button bypasses that matrix.
  • Push notifications stop after changing phones. Remove the old device under Push Service and re-pair DS finder; each device is registered separately.
  • Resource Monitor shows memory at 90 percent and people panic. Linux uses free RAM as cache; the number that matters is under Memory → "Swap usage". Non-zero, growing swap is a real problem, high cache usage is not.

Half an hour of clicking, and it has saved me from a degraded pool going unnoticed more than once.