{"id":175981,"date":"2021-02-11T17:00:00","date_gmt":"2021-02-11T14:00:00","guid":{"rendered":"https:\/\/en.buradabiliyorum.com\/how-to-monitor-your-digitalocean-droplets\/"},"modified":"2021-02-11T17:00:00","modified_gmt":"2021-02-11T14:00:00","slug":"how-to-monitor-your-digitalocean-droplets","status":"publish","type":"post","link":"https:\/\/buradabiliyorum.com\/en\/how-to-monitor-your-digitalocean-droplets\/","title":{"rendered":"#How to Monitor Your DigitalOcean Droplets"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_85 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a3e2df1d7a77\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #dd3333;color:#dd3333\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #dd3333;color:#dd3333\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a3e2df1d7a77\" checked aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-monitor-your-digitalocean-droplets\/#Graphing_Droplet_Metrics\" >Graphing Droplet Metrics<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-monitor-your-digitalocean-droplets\/#How_Are_Metrics_Collected\" >How Are Metrics Collected?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-monitor-your-digitalocean-droplets\/#More_in-Depth_Monitoring_With_Linux_Tools\" >More in-Depth Monitoring With Linux Tools<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-monitor-your-digitalocean-droplets\/#Creating_Automated_Alert_Policies\" >Creating Automated Alert Policies<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-monitor-your-digitalocean-droplets\/#Limitations_of_DigitalOceans_Monitoring\" >Limitations of DigitalOcean&#8217;s Monitoring<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-monitor-your-digitalocean-droplets\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<p><strong>&#8220;#How to Monitor Your DigitalOcean Droplets&#8221;<\/strong><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8934\" src=\"https:\/\/www.cloudsavvyit.com\/thumbcache\/0\/0\/d5c2fece844d4f63b2b725cd788a8ac9\/p\/uploads\/2021\/01\/83680385.jpeg\" alt=\"DigitalOcean logo\" width=\"1600\" height=\"900\" \/><\/p>\n<p>Monitoring your cloud resources lets you stay ahead of demanding workloads. DigitalOcean&#8217;s droplets benefit from versatile built-in reporting options that give you visibility into your usage.<\/p>\n<h2 id=\"graphing-droplet-metrics\"><span class=\"ez-toc-section\" id=\"Graphing_Droplet_Metrics\"><\/span>Graphing Droplet Metrics<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The most straightforward way to monitor your droplets is with the graphs in the Cloud Control Panel. Log in to your DigitalOcean account and click one of your droplets. You&#8217;ll end up on the Graphs screen.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9551\" src=\"https:\/\/www.cloudsavvyit.com\/thumbcache\/0\/0\/fbb1c6dcb4fdd0fa76a83e801382ad86\/p\/uploads\/2021\/02\/c3d5d156.jpg\" alt=\"Screenshot of droplet graphs in the DigitalOcean Control Panel\" width=\"1268\" height=\"658\" \/><\/p>\n<p>The graphs give you an at-a-glance view of your droplet&#8217;s CPU, RAM, and disk and network utilization. Using the dropdowns at the top right, you can adjust the timeframe on display and set an automatic refresh interval. Data is available from the past hour through the past 14 days.<\/p>\n<h2 id=\"how-are-metrics-collected\"><span class=\"ez-toc-section\" id=\"How_Are_Metrics_Collected\"><\/span>How Are Metrics Collected?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The metrics are collected from your droplet using DigitalOcean&#8217;s open-source <code>do-agent<\/code> utility. This is supported on Ubuntu, CentOS, Debian, and Fedora. Other distributions (as well as older versions of the above) can&#8217;t use <code>do-agent,<\/code> and display a limited set of basic graphs instead.<\/p>\n<p>You can <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.digitalocean.com\/docs\/monitoring\/#agent-overview\">manually install<\/a> <code>do-agent<\/code> if your droplet&#8217;s running a supported distribution, but you don&#8217;t see the full complement of graphs. This might be because you upgraded your droplet from an older version, or perhaps you originally created it without the metrics agent installed.<\/p>\n<p>Connect to your droplet over SSH and run the following installation <a href=\"https:\/\/buradabiliyorum.com\/en\/category\/download-scripts-themes-apps\/\" data-internallinksmanager029f6b8e52c=\"9\" title=\"Download Scripts &amp; Themes &amp; Apps\" target=\"_blank\" rel=\"noopener\">script<\/a>:<\/p>\n<pre>curl -sSL https:\/\/repos.insights.digitalocean.com\/install.sh | sudo bash<\/pre>\n<p>Data should start to appear in your Cloud Control Panel within a few minutes.<\/p>\n<p><code>do-agent<\/code> <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.digitalocean.com\/blog\/improved-graphs\/\">periodically collects data<\/a> from the <code>\/proc<\/code> virtual filesystem. The metrics are then uploaded via gRPC to DigitalOcean&#8217;s ingest endpoint. The agent authenticates itself as belonging to your droplet, so the data ends up in your DigitalOcean account.<\/p>\n<p>None of the information provided by <code>do-agent<\/code> is security-sensitive. The tool only transmits data and does not receive it. Although it communicates over ports 80 and 443, you can safely run a web server while it is installed.<\/p>\n<h2 id=\"more-in-depth-monitoring-with-linux-tools\"><span class=\"ez-toc-section\" id=\"More_in-Depth_Monitoring_With_Linux_Tools\"><\/span>More in-Depth Monitoring With Linux Tools<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>DigitalOcean&#8217;s graphs give you an at-a-glance view of your droplet. You&#8217;ll need to connect over SSH and use Linux tools to delve deeper into spikes in activity.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9552\" src=\"https:\/\/www.cloudsavvyit.com\/thumbcache\/0\/0\/b3c6e3e029bba45a9ea5704f2ebd7a1f\/p\/uploads\/2021\/02\/afa1fa30.jpg\" alt=\"Screenshot of top command running in a Linux shell\" width=\"958\" height=\"538\" \/><\/p>\n<p>You can use <code>top<\/code> to quickly view the processes running on your droplet. The table is automatically updated. It&#8217;s sorted by CPU usage by default. To switch to sorting by memory consumption, press <code>Shift+M<\/code>. You can switch between memory units (bytes\/MB\/GB) by pressing the <code>e<\/code> key. The units of the stats at the top of the screen are toggled using <code>Shift+E<\/code>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9559\" src=\"https:\/\/www.cloudsavvyit.com\/thumbcache\/0\/0\/c02530eea91a51597a38855eb26aee16\/p\/uploads\/2021\/02\/c3d5d156-1.jpg\" alt=\"Screenshot of uptime command running in a Linux shell\" width=\"952\" height=\"158\" \/><\/p>\n<p>Another useful monitoring command is <code>uptime<\/code>. This shows you how long your droplet has been running, how many user connections have been made in that time, and the load average figures over the past one, five, and 15 minutes.<\/p>\n<p>Load average is a measure of the number of running and waiting processes over a period of time. It indicates the availability of your system to handle new processes. A low load average suggests that your droplet is <a href=\"https:\/\/buradabiliyorum.com\/en\/category\/general\/\" data-internallinksmanager029f6b8e52c=\"3\" title=\"General\" target=\"_blank\" rel=\"noopener\">general<\/a>ly idling, which you could verify by looking at DigitalOcean&#8217;s CPU graph. The maximum load average value is equivalent to the number of cores available to your server (i.e.\u00a0<code>4.0<\/code> on a droplet with 4 vCPUs).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9554\" src=\"https:\/\/www.cloudsavvyit.com\/thumbcache\/0\/0\/3182a68d6bcfa30ee38a18b15b60546f\/p\/uploads\/2021\/02\/6cb37ee3.jpg\" alt=\"Screenshot of iostat command running in a Linux shell\" width=\"958\" height=\"538\" \/><\/p>\n<p>Information on disk utilization can be obtained from <code>iotop<\/code>. This will show you real-time disk read-and-write stats. It includes a list of the processes that are using your disk. The IO column indicates the percentage of time that each process spent waiting on disk I\/O.<\/p>\n<h2 id=\"creating-automated-alert-policies\"><span class=\"ez-toc-section\" id=\"Creating_Automated_Alert_Policies\"><\/span>Creating Automated Alert Policies<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>You can opt-in to receive alerts when metrics exceed a specific threshold. Alerts can be sent over email or via Slack.<\/p>\n<p>Click the &#8220;Monitoring&#8221; link in the Control Panel sidebar. You&#8217;ll see a list of the alerts in your account. Click the blue &#8220;Create alert policy&#8221; button to add a new policy.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9555\" src=\"https:\/\/www.cloudsavvyit.com\/thumbcache\/0\/0\/c5d9dd1b7e970aededf62c1224eb4f49\/p\/uploads\/2021\/02\/202aaaae.jpg\" alt=\"Screenshot of DigitalOcean Monitoring Alerts screen\" width=\"1268\" height=\"658\" \/><\/p>\n<p>Use the dropdowns to configure your new alert. The available metrics align with the data collected by <code>do-agent<\/code>. You can choose between five-, ten-, 30-, and 60-minute reporting thresholds. The example shown below would send you an alert if the CPU usage exceeded 70% for more than five minutes. The aggregate reporting prevents momentary spikes and troughs from creating a slew of alerts.<\/p>\n<p>Next, choose the droplets to apply your policy to. You can add individual droplets, a tag name (for Kubernetes nodes), or the special &#8220;All Droplets&#8221; selector.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9556\" src=\"https:\/\/www.cloudsavvyit.com\/thumbcache\/0\/0\/73d377fa5019205869e84ed8c86a0b2e\/p\/uploads\/2021\/02\/d464ecc8.jpg\" alt=\"Screenshot of creating an alert policy in DigitalOcean\" width=\"1268\" height=\"658\" \/><\/p>\n<p>Under &#8220;Send alerts via,&#8221; configure the alerting mechanism. This is prefilled with the email address associated with your DigitalOcean account. You can add additional recipients if needed, which is useful if you&#8217;d prefer a co-worker or contractor to handle incidents.<\/p>\n<p>You can opt to receive alerts in Slack. Click the &#8220;Connect Slack&#8221; button and follow the prompts to log in to your Slack account. Authorize DigitalOcean to access your Slack workspace. You&#8217;ll then be able to choose whether alerts are posted to a channel or to a user&#8217;s direct messages.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9557\" src=\"https:\/\/www.cloudsavvyit.com\/thumbcache\/0\/0\/eca5b9fb07c495916952380f8a0d0e1e\/p\/uploads\/2021\/02\/59a95501.jpg\" alt=\"Screenshot of creating an alert policy in DigitalOcean\" width=\"1268\" height=\"658\" \/><\/p>\n<p>To activate your alert, give it a name and press the &#8220;Create alert policy&#8221; button. You&#8217;ll need to repeat the process and add another alert if you want to track more metrics. There&#8217;s currently no support for adding multiple metrics to a single alert policy.<\/p>\n<h2 id=\"limitations-of-digitaloceans-monitoring\"><span class=\"ez-toc-section\" id=\"Limitations_of_DigitalOceans_Monitoring\"><\/span>Limitations of DigitalOcean&#8217;s Monitoring<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>DigitalOcean&#8217;s monitoring options give you a high-level view of your droplet&#8217;s performance. The data is accurate and timely but only shows you what&#8217;s happening, not why.<\/p>\n<p>Configuring a DigitalOcean alert policy ensures that you&#8217;re made aware of problematic events as they arise. Nonetheless, the system can&#8217;t be used as your sole monitoring solution. You&#8217;ll need to make sure that you&#8217;re prepared, with tools and workflows that can expose the root cause of anomalous activity.<\/p>\n<p>DigitalOcean&#8217;s monitoring focuses on the system health of your droplet. In an ideal scenario, it should be rare that an alert triggers. Your application-level monitoring system should begin reporting increased error rates or throughput bottlenecks before they impact the wider system. However, in many teams, incident response still starts from the top-down, in which case, DigitalOcean&#8217;s Graphs and Alerts are an im<a href=\"https:\/\/buradabiliyorum.com\/en\/category\/social-mediaa\/\" data-internallinksmanager029f6b8e52c=\"1\" title=\"Social Media\" target=\"_blank\" rel=\"noopener\">media<\/a>te tool to help inform firefighting.<\/p>\n<h2 id=\"conclusion\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>DigitalOcean&#8217;s monitoring options let you visualize resource usage and stay ahead of changing requirements. Beyond droplets, the Control Panel also offers activity graphs of Managed Databases, Kubernetes Clusters, and Load Balancers. Select any of these resources from its respective Control Panel page to assess activity in real-time. Alongside droplet compute stats, these metrics give you insights into the pressures your workloads are facing.<\/p>\n<blockquote><p><strong><span style=\"color: #ff6600;\">If you liked the article, do not forget to share it with your friends. Follow us on\u00a0<span style=\"color: #ff0000;\"><a style=\"color: #ff0000;\" href=\"https:\/\/news.google.com\/publications\/CAAqBwgKMLG0nwswvr63Aw\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Google News<\/a><\/span>\u00a0too, click on the star and choose us from your favorites.<\/span><\/strong><\/p><\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\">For forums sites go to <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/forum.buradabiliyorum.com\/\" target=\"_blank\" rel=\"noopener\">Forum.BuradaBiliyorum.Com<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\"><strong>If you want to read more like this article, you can visit our <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/en.buradabiliyorum.com\/technology\/\" target=\"_blank\" rel=\"noopener\">Technology category.<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<p><span style=\"color: black;\"><a style=\"color: #ff9900;\" href=\"https:\/\/www.cloudsavvyit.com\/9550\/how-to-monitor-your-digitalocean-droplets\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;#How to Monitor Your DigitalOcean Droplets&#8221; Monitoring your cloud resources lets you stay ahead of demanding workloads. DigitalOcean&#8217;s droplets benefit from versatile built-in reporting options that give you visibility into your usage. Graphing Droplet Metrics The most straightforward way to monitor your droplets is with the graphs in the Cloud Control Panel. Log in to&#8230;<\/p>\n","protected":false},"author":1,"featured_media":175982,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"https:\/\/www.cloudsavvyit.com\/thumbcache\/0\/0\/d5c2fece844d4f63b2b725cd788a8ac9\/p\/uploads\/2021\/01\/83680385.jpeg","fifu_image_alt":"","footnotes":""},"categories":[18],"tags":[],"class_list":["post-175981","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology"],"_links":{"self":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/175981","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/comments?post=175981"}],"version-history":[{"count":0,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/175981\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media\/175982"}],"wp:attachment":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media?parent=175981"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/categories?post=175981"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/tags?post=175981"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}