How to monitor Digital Ocean servers with StackScout
Digital Ocean is a simple, popular cloud service provider that offers a wide range of cloud products. With its easy-to-use platform, Digital Ocean makes it simple for users to quickly and efficiently set up virtual servers, known as droplets, as well as Kubernetes clusters, databases, and other resources. Despite its popularity, Digital Ocean has limited monitoring capabilities that may not meet the needs of many businesses. In this article, we’ll explore how you can get started with droplet, or server, monitoring using StackScout, a multi-cloud infrastructure observability platform that gives you the tools you need to monitor your infrastructure.
Whether you’re a seasoned IT professional or just starting out with cloud products, we’ll walk you through the process of setting up Digital Ocean droplets, creating StackScout account, and adding observability to the servers.
Create your first Digital Ocean server
We’ll begin with an assumption that you have a Digital Ocean account (if not, head over to digitalocean.com first) but you haven’t set up any servers yet. If you do have droplets running - great, you can skip to the next section!
First, sign in with your Digital Ocean credentials, and open Droplets module in the left hand side menu.
Click the blue Create Droplet button, and select the desired server configuration. You can choose a location that’s close to you or your users, and the required size. For many workloads, even the smallest droplet may suffice! Choose an authentication method - SSH key or set up a password, and click Create button. After a couple of minutes, your newly created server should appear on the list.
Take a note of the IP address, as it’ll be needed in order to set up StackScout next.
Create a StackScout account
If you don’t have a StackScout account, head to the registration page and fill in the required details - your email address, name, and set up an account password. We offer a completely free 14-day trial, with no credit-card information required, so you can get started right away. Choose a plan that suits you best, depending on the number of servers and hosts you’re planning to monitor, and what data retention period you require. If you’re unsure, you can get started with the Essentials plan, and upgrade at any point later!
Click “Start your Free Trial” button, and your account will get created in a few seconds.
Next, you can open the StackScout sign in page, use the email address and the password you just created to login.
The first screen you’ll always see after signing in, is the servers list page. Since you’ve only just created an account, the list will be empty!
Let’s set up the monitoring of your first server now!
Installing StackScout monitoring agent on a Digital Ocean droplet
On the servers list page, either click the “Connect servers” button in the right side of the page header, or if you don’t have any servers connected yet, you can click the “Connect a server” link in the center of the screen. This will take you to the installation mode selection screen.
StackScout integrates into your infrastructure by installing a small program (called the monitoring agent) that runs in the background on each server that you want to monitor. It gathers telemetry data (such as memory, disk, and CPU usage, information about available CPU hardware, and much more) and sends it back to your StackScout agent, which we can present in a friendly, and easy to understand format.
You can install the monitoring agent in two different ways:
- Manually - if you select “Manual installation” option on the screen, you’ll be presented with instruction on how to install the agent yourself. It will require you to SSH into the server, download and extract a tarball, update the API key, and start the agent in daemon mode, which will make it run in the background and start automatically in case of server restarts. If you’re comfortable with the command line and at least basics of server administration, you can go ahead and do that now!
- Automatically - one of the innovations we’re most proud of, is the unique set up process that StackScout offers. It allows even less experienced users to get started with infrastructure monitoring in minutes, with no need to know the jargon, command line, or server administration principles. The installation process is fully automated and should work seamlessly on most of the hardware and operating system configurations that StackScout supports, which includes most Linux, Unix, and macOS systems and architectures.
Click on the “Install automatically” button, and you’ll be presented with the first step of the short installation wizard.
You can start filling the form using the details of the Digital Ocean server that you’ve created.
- Hostname - provide the IP address displayed in Digital Ocean dashboard (quick tip, if you click on it, it’ll get copied to your clipboard automatically)
- Port - you can leave the default port 22 unchanged
- User - the default username generally depends on the operating system, if you created an Ubuntu server, set it to root
- Credentials - assuming you created Digital Ocean droplet with a custom password, leave the Password dropdown option unchanged
- Password - input the password you created the server with
- Sudo password - since the root user has sufficient permissions, you can leave this field empty
When done, click “Test credentials” button. This will trigger a verification process, where StackScout will try to connect to the server using the credentials you just provided. In case of any problems, you’ll see a detailed error message. If server details are good, the “Start installation” button will become active. Let’s click it!
The installation will begin automatically and will normally take 10-20 seconds, although it may take up to a few minutes. Once done, you can return to the list of the servers. Your Digital Ocean droplet will now appear on the page!
You can also click on the server to view all details. Keep in mind, it may take a few minutes for the charts to start displaying meaningful data!
A good next step would be to set up alerting for you to get notifications if the server goes down, or the resource usage reaches the limits. You can do that easily from the Alerts modules. First create a notification channel (for instance your phone number for text notifications, or email address) and then add an alert policy. You can define trigger conditions based on the server state, or different types of metrics available.