

Recently, we were receiving high CPU alerts from our VPS provider. A much easier way to diagnose issues is to use an application monitoring tool like New Relic. If it’s MySQL, you’ll need to enable the slow query log. If it’s Nginx or PHP appearing at the top of the list, you should have a look at your access and error logs. If you’re investigating an alert about memory, you’ll need to change the sort column by hitting the F6 key. The above screenshot is sorting by CPU usage, so if the alert you’re investigating was about high CPU usage, you should be able to see the processes that are eating a lot of your CPU at the top of the list. To investigate, SSH into your server: ssh htop to have a look at the system resource usage in real-time: htop I like to set up alerts for CPU, memory and disk utilization with a threshold of 80%, which is a good starting point for most people.Ī high resource usage alert can be the first sign that something is wrong with your server or the applications that it’s running. Here you can create as many alert policies as required. Head to the Monitoring tab and click Create alert policy. Alerts reduce the need to manually check your server’s health by sending a notification when one of your chosen metrics reaches a certain threshold. Once installed, you should see the Droplet’s current resource utilization when visiting the Droplet dashboard.Īlert policies are extremely useful, and you should configure them for all Droplets. If you enabled monitoring during the Droplet creation, then you’re good to go! Otherwise, you’ll need to install DigitalOcean’s metrics agent manually. For those not hosting with Digital Ocean, Netdata is a great alternative or Pingdom Server Monitoring if you’d prefer not to host it yourself. Server MonitoringĪs I’m using Digital Ocean, monitoring server performance is a relatively simple process thanks to the built-in monitoring tools. We’ll look at performing software updates, upgrading PHP, and a few “gotchas” to watch out for that we may have experienced ourselves.īut first, let’s start with server monitoring.

In this chapter I’m going to outline a few tasks that should be carried out on a regular basis to ensure that your server continues to run securely and perform well. So you’ve followed our in-depth guide and built yourself a shiny new server that’s secure and tuned for optimal WordPress performance, but what’s next?
