How to Monitor DigitalOcean VPS

Cara Monitoring VPS DigitalOcean

Monitoring server resources such as RAM, CPU, disk, and network. This is done to find out how much use of these resources. Based on the resource usage data that we get from the monitoring results, we can easily make decisions to increase or decrease server capacity, especially VPS.

DigitalOcean VPS users can monitor Bandwidth, CPU and Disk I/O usage via the Droplet Name->Graphs page.

Graphs droplet DigitalOcean
Graphs droplet DigitalOcean

These graphs can still be added with Load, Memory, and Disk Usage monitoring by installing the Metric agent.

Install do-agent

Download the do-agent installer.

Run the installer.

Check the do-agent installation results.

Check the Graphs page again.

Alert Policies

Alert Policies is a feature at DigitalOcean that can send notifications to email and Slack when resource usage in a droplet reaches its limit and occurs in an interval of at least 5 minutes to 1 hour.

For example, we want DigitalOcean to send a notification when CPU usage has reached the limit above 80% for 5 minutes.

Open Alert Policies, click the menu Create->Alert Policies.

At Select metric & set threshold, select CPU, is above, 80%, 5 min.

At Select Droplets or Tags, enter a droplet or tag.

At Send alerts via, check the email, and click Connect Slack if you want to send a notification to Slack.

Create alert policy
Create alert policy

Finally, at Name and create alert policy, enter a name for the alert policy, and click Create alert policy.

Name of alert policy
Name of alert policy

Alert Policy Testing

To test the alert policy, whether it successfully sends a notification to the email or not, we have to force the CPU to work up to above 80% for 5 minutes. We can use Stress, a tool for stress testing systems, running large workloads.

Install stress on Debian or Ubuntu.

Install stress on CentOS.

Run stress for CPUs with 1 core.

Stress will make the CPU work up to 100%. See CPU usage in Graphs.

Graphs - CPU Usage
Graphs – CPU Usage

The notification will be sent after 5 minutes.

Email notification - monitoring triggered
Email notification – monitoring triggered

To stop Stress, press CTRL + C.

Another notification is sent when the CPU usage is below 80%.

Email notification - monitoring resolved
Email notification – monitoring resolved

Get a $ 100 free credit for every new account creation at DigitalOcean, register via this link.

Good luck 🙂

Default image
Musa Amin
I am a Linux System Administrator and also write many tutorials about Linux, Cloud, and Open Source. Hire me via email hai[at]musaamin.web.id.
Articles: 712

2 Comments

  1. Om boleh minta tutorial untuk config dan manage san storage dell??

Leave a Reply