Home / Site Wizard / Server Monitoring Dashboard

Server Monitoring Dashboard

A collector script plus phone alerts — you know the moment something breaks, instead of finding out later.

🛠 Scenario ⏱ 1.5 hours 5 steps Difficulty 0 / 5 steps done
■ Full text · Static content

Server Monitoring Dashboard: the complete 5-step walkthrough

This is the full static walkthrough (scripts and checklists included), generated by scripts/seo-prerender.js from data/en/steps.json so that search engines and visitors with JavaScript disabled can read it. The interactive wizard above has exactly the same content.

  1. Step 1 · Get a server and install a hosting panel

    A 2-core / 2 GB box with a control panel on it

    Run the monitoring dashboard on its own machine, not alongside your main workload — if the service dies and monitoring dies with it, the monitoring was pointless.

    Two vCPU and 2 GB of RAM with a few Mbps of bandwidth is enough, for roughly US$10–15 a year on an entry plan. Prefer Ubuntu 22.04 or another supported LTS; panels behave best on those.

    Three things before anything else:

    1. Open ports 22, 80, 443 and the panel port in the cloud console's security group
    2. Point a subdomain at this machine (for example monitor.example.com) with an A record
    3. SSH in and run the setup script to install the panel
    Checklist
    • SSH works and the panel command is available
    • The panel port is open in the security group
    • The subdomain resolves to this machine's IP
  2. Step 2 · Deploy the collection script

    Collect CPU / memory / disk / processes into JSON

    Monitoring is three stages: collect → store → display. This step covers the first two.

    Each run of the collector writes these metrics into a JSON file:

    • CPU usage and load average (1 / 5 / 15 minutes)
    • Memory usage and swap usage
    • Disk usage per partition
    • Whether key processes are alive (nginx, php-fpm, mysql)
    • System uptime

    Write it to a fixed path such as /www/wwwroot/monitor.example.com/data/status.json, and the front end can fetch that file and draw the charts.

    Why land it in JSON instead of querying a database? Because the front end stays a static page. However you decide to collect later, not a line of front-end code has to change.

    Checklist
    • Running the script produces status.json
    • The values look sane — CPU isn't 0 or 100
    • http://domain/data/status.json opens in a browser
  3. Step 3 · Configure alerting (chat webhook / email)

    Push threshold breaches to your phone instead of staring at a screen

    Monitoring that nobody looks at is monitoring you didn't do. It has to come find you when something's wrong.

    Options, easiest first:

    1. A chat bot webhook: create a group with only yourself in it, add a custom bot, take the webhook URL, and POST a JSON from the script. Free and unlimited
    2. Your existing chat platform's bot: same idea — take the webhook from the group settings. Cheapest if you already use it
    3. Telegram bot: ask BotFather for a token. The best option for servers outside China
    4. Email: most panels can do it, but it's the least real-time. Treat it as a fallback

    Suggested thresholds:

    • CPU above 90% for 5 straight minutes
    • Memory usage above 90%
    • Disk usage above 85%
    • A key process is missing

    The one principle that matters: add a silence window. Send the same alert at most once per 10 minutes, or you'll get two hundred messages overnight and switch alerts off entirely.

    Checklist
    • Lowering a threshold produces a test alert
    • You can read the alert on your phone
    • The same alert isn't repeated inside the silence window
  4. Step 4 · Schedule it and make it survive a reboot

    Collect once a minute; come back automatically after a restart

    Once the script works, make it run on its own.

    Option 1: the panel's scheduler (best if you're new to this) — scheduled tasks → add task → type "shell script" → period "every N minutes" → 1 → paste the script's absolute path.

    Option 2: crontab (lighter) — crontab -e and add:
    * * * * * /bin/bash /root/monitor/collect.sh >/dev/null 2>&1

    Start on boot — if the collector is a long-running daemon rather than a per-minute script, write a .service file into /etc/systemd/system/ and then run:
    systemctl daemon-reload && systemctl enable monitor && systemctl start monitor

    Finally, reboot the server to verify: after it comes back, metrics should keep updating without you logging in.

    Checklist
    • The new task shows up in the scheduler list
    • status.json's update time advances every minute
    • Collection resumes automatically after a reboot
  5. Step 5 · Dashboard + backup strategy

    Turn the JSON into charts, and back up the config

    Last step: make the data readable at a glance.

    Display layer: a single static HTML page that fetches status.json every 30 seconds with setInterval and renders a few progress bars plus number cards. You don't need a charting library — plain CSS bars are the sturdiest and fastest option.

    Colour conventions (don't underestimate these):

    • Normal: green
    • Warning (above 80%): amber
    • Critical (above 90%): red

    With that, one glance tells you whether anything is wrong; you never have to read the numbers.

    Backup strategy: the monitoring config is small, but rewriting it is annoying.

    1. Panel → scheduled tasks → back up the site, weekly
    2. Include the script directory /root/monitor/ in the archive
    3. Store it in object storage, and keep a local copy as well

    Weekly five-minute checklist:

    • Is the dashboard still updating?
    • Do alerts still arrive? Test one on purpose
    • Is disk growth trending oddly?
    Checklist
    • The dashboard refreshes every 30 seconds
    • Bars turn amber / red past the thresholds
    • The backup job exists and runs successfully by hand

More questions about Server Monitoring Dashboard

How many steps does Server Monitoring Dashboard take, and how long will it take?

5 steps, about 1.5 hours: 1) Get a server and install a hosting panel; 2) Deploy the collection script; 3) Configure alerting (chat webhook / email); 4) Schedule it and make it survive a reboot; 5) Dashboard + backup strategy. Every step ships with instructions, a copy-paste script and a checklist.

What is the first step for Server Monitoring Dashboard?

Get a server and install a hosting panel — A 2-core / 2 GB box with a control panel on it. Everything after it builds on this step.

How do I know I did Server Monitoring Dashboard right?

Dashboard + backup strategy — Turn the JSON into charts, and back up the config. The checklist in that step is your acceptance test: tick every box before you call it live.