{"id":12607,"date":"2022-05-07T15:56:43","date_gmt":"2022-05-07T12:56:43","guid":{"rendered":"https:\/\/kifarunix.com\/?p=12607"},"modified":"2024-03-09T14:15:39","modified_gmt":"2024-03-09T11:15:39","slug":"how-to-monitor-linux-system-metrics-using-sensu","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/how-to-monitor-linux-system-metrics-using-sensu\/","title":{"rendered":"How to Monitor Linux System Metrics using Sensu"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"990\" height=\"557\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/monitor-linux-system-metrics-using-sensu.png\" alt=\"monitor Linux system metrics using Sensu\" class=\"wp-image-12621\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/monitor-linux-system-metrics-using-sensu.png 990w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/monitor-linux-system-metrics-using-sensu-768x432.png 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/monitor-linux-system-metrics-using-sensu-150x84.png 150w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/monitor-linux-system-metrics-using-sensu-300x169.png 300w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/monitor-linux-system-metrics-using-sensu-696x392.png 696w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/monitor-linux-system-metrics-using-sensu-746x420.png 746w\" sizes=\"(max-width: 990px) 100vw, 990px\" \/><\/figure>\n\n\n\n<p>In this tutorial, you will learn how to monitor Linux system metrics using Sensu. <a href=\"https:\/\/sensu.io\/about\" target=\"_blank\" rel=\"noreferrer noopener\">Sensu<\/a>&nbsp;is an opensource infrastructure and application monitoring tool. You will learn to monitor such metrics as CPU usage, memory usage, disk usage e.t.c.<\/p>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li><a href=\"#monitor-linux-system-metrics-using-sensu\">Monitor Linux System Metrics using Sensu<\/a><ul><li><a href=\"#configure-sensu-agent-entity-subscription\">Configure Sensu Agent Entity Subscription<\/a><\/li><li><a href=\"#install-sensu-check-plugins-on-the-sensu-backend\">Install Sensu Check Plugins on the Sensu Backend<\/a><\/li><li><a href=\"#create-sensu-monitoring-command-checks\">Create Sensu Monitoring Command Checks<\/a><\/li><li><a href=\"#verify-sensu-remote-host-metrics-monitoring\">Verify Sensu Remote Host Metrics Monitoring<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"monitor-linux-system-metrics-using-sensu\">Monitor Linux System Metrics using Sensu<\/h2>\n\n\n\n<p>In order to monitor Linux system metrics using Sensu, you need to have a running Sensu Backend server as well Sensu agent installed on the remote system whose metrics is being monitored.<\/p>\n\n\n\n<p>The guides below can help setup the backend server as well deploy Sensu agent on some Linux distros.<\/p>\n\n\n\n<p>Installing Sensu Backend;<\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-sensu-go-on-debian-11\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install Sensu Go on Debian 11<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-sensu-go-on-ubuntu\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install Sensu Go on Ubuntu 22.04<\/a><\/p>\n\n\n\n<p>Installing Sensu Agent;<\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-sensu-agent-on-ubuntu-debian\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install Sensu Agent on Ubuntu\/Debian<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-sensu-agent-on-rocky-linux\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install Sensu Agent on Rocky Linux<\/a><\/p>\n\n\n\n<p>Once you are set, so how can you monitor Linux system metrics using Sensu?<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"configure-sensu-agent-entity-subscription\"><a href=\"#agent-subscription\">Configure Sensu Agent Entity Subscription<\/a><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Sensu agent entity is a remote monitoring agent being monitored<\/li>\n\n\n\n<li>Sensu works in a pubsub (Publish\/Subcribe) communication model whereby Sensu backend <strong>publishes<\/strong> the service monitoring checks and the Sensu agent entities running on the remote end points being monitored <strong>subscribe<\/strong> to the service monitoring checks (<em>topics<\/em>) published by the Sensu backend.<\/li>\n\n\n\n<li><a href=\"https:\/\/docs.sensu.io\/sensu-go\/latest\/observability-pipeline\/observe-schedule\/checks\/\" target=\"_blank\" rel=\"noreferrer noopener\">checks<\/a> are the commands or scripts that <em>the Sensu agent executes, output data and produce an exit code to indicate a state.<\/em><\/li>\n\n\n\n<li>A subscription thus can contain multiple types of checks. For example, you have a subscription named Linux with the CPU load, Memory usage, disk usage&#8230; checks.<\/li>\n<\/ul>\n\n\n\n<p>You can manage Sensu agent entities using the <strong><code>sensuctl entity<\/code><\/strong> command;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sensuctl entity --help<\/code><\/pre>\n\n\n\n<p>To configure a Sensu agent entity subscription, first extract the ID of the agent;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sensuctl entity list<\/code><\/pre>\n\n\n\n<p>Sample output;<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>     ID      Class    OS      Subscriptions              Last Seen            \n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n  debian11   agent   linux   entity:debian11   2022-05-07 08:04:05 +0000 UTC  \n  rocky8     agent   linux   entity:rocky8     2022-05-07 08:03:57 +0000 UTC\n<\/code><\/pre>\n\n\n\n<p>From the output above, you can see the subscriptions for the agents. We need to update the subscriptions for these agents.<\/p>\n\n\n\n<p>For example, since we have two Linux systems, let&#8217;s enroll them in a subscription called linux by updating these agents entities.<\/p>\n\n\n\n<p>Use the command;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sensuctl entity update &#91;ID] &#91;flags]<\/code><\/pre>\n\n\n\n<p>For example, to update the Subscription to debian11 agent entity;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sensuctl entity update debian11<\/code><\/pre>\n\n\n\n<p>When prompted, enter <strong>agent<\/strong> for Entity Class and <strong>linux<\/strong> for subscription.<\/p>\n\n\n\n<p>Sample output;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>? Entity Class: agent\n? Subscriptions: linux\nUpdated<\/code><\/pre>\n\n\n\n<p>Do the same for the other agents;<\/p>\n\n\n\n<p>Confirm the changes;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sensuctl entity list<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"install-sensu-check-plugins-on-the-sensu-backend\"><a href=\"#sensu-checks\">Install Sensu Check Plugins on the Sensu Backend<\/a><\/h3>\n\n\n\n<p>Next, install Sensu check plugins on the Sensu backend. We use <a href=\"https:\/\/docs.sensu.io\/sensu-go\/latest\/plugins\/assets\/\" target=\"_blank\" rel=\"noreferrer noopener\">dynamic runtime assets<\/a>&nbsp;in this setup.<\/p>\n\n\n\n<p>There are multiple plugins available that can be used to monitor system metrics using Sensu. You can check them on the <a href=\"https:\/\/bonsai.sensu.io\/\" target=\"_blank\" rel=\"noreferrer noopener\">Bonsai Sensu Assets repository<\/a>.<\/p>\n\n\n\n<p>As an example, we will install the Sensu check plugins to check CPU usage, memory usage, disk usage<\/p>\n\n\n\n<p>Install Sensu CPU Usage check plugin;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sensuctl asset add sensu\/check-cpu-usage -r check-cpu-usage<\/code><\/pre>\n\n\n\n<p>Option <strong><code>-r<\/code><\/strong> changes the name of the Check on the system.<\/p>\n\n\n\n<p>Sample installation output;<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>no version specified, using latest: 0.2.2\nfetching bonsai asset: sensu\/check-cpu-usage:0.2.2\nadded asset: sensu\/check-cpu-usage:0.2.2\n\nYou have successfully added the Sensu asset resource, but the asset will not get downloaded until\nit's invoked by another Sensu resource (ex. check). To add this runtime asset to the appropriate\nresource, populate the \"runtime_assets\" field with [\"check-cpu-usage\"].\n<\/code><\/pre>\n\n\n\n<p>Install Sensu Disk Usage check plugin;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sensuctl asset add sensu\/check-disk-usage -r check-disk-usage<\/code><\/pre>\n\n\n\n<p>Install Sensu Memory and Swap Usage check plugin;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sensuctl asset add sensu\/check-memory-usage -r check-memory-usage<\/code><\/pre>\n\n\n\n<p>List the installed dynamic runtime assets;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sensuctl asset list<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>         Name                                               URL                                         Hash    \n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n  check-cpu-usage      \/\/assets.bonsai.sensu.io\/...\/check-cpu-usage_0.2.2_windows_amd64.tar.gz         900cfdf  \n  check-cpu-usage      \/\/assets.bonsai.sensu.io\/...\/check-cpu-usage_0.2.2_darwin_amd64.tar.gz          db81ee7  \n  check-cpu-usage      \/\/assets.bonsai.sensu.io\/...\/check-cpu-usage_0.2.2_linux_armv7.tar.gz           400aacc  \n  check-cpu-usage      \/\/assets.bonsai.sensu.io\/...\/check-cpu-usage_0.2.2_linux_arm64.tar.gz           bef7802  \n  check-cpu-usage      \/\/assets.bonsai.sensu.io\/...\/check-cpu-usage_0.2.2_linux_386.tar.gz             a2dcb53  \n  check-cpu-usage      \/\/assets.bonsai.sensu.io\/...\/check-cpu-usage_0.2.2_linux_amd64.tar.gz           2453973  \n  check-disk-usage     \/\/assets.bonsai.sensu.io\/...\/check-disk-usage_0.7.0_windows_amd64.tar.gz        e28c0da  \n  check-disk-usage     \/\/assets.bonsai.sensu.io\/...\/check-disk-usage_0.7.0_darwin_amd64.tar.gz         2b3a8f1  \n  check-disk-usage     \/\/assets.bonsai.sensu.io\/...\/check-disk-usage_0.7.0_linux_armv7.tar.gz          0c2c5ce  \n  check-disk-usage     \/\/assets.bonsai.sensu.io\/...\/check-disk-usage_0.7.0_linux_arm64.tar.gz          f5234e9  \n  check-disk-usage     \/\/assets.bonsai.sensu.io\/...\/check-disk-usage_0.7.0_linux_386.tar.gz            102f2ca  \n  check-disk-usage     \/\/assets.bonsai.sensu.io\/...\/check-disk-usage_0.7.0_linux_amd64.tar.gz          0b76e77  \n  check-memory-usage   \/\/assets.bonsai.sensu.io\/...\/check-memory-usage_0.2.2_windows_amd64.tar.gz      90a997a  \n  check-memory-usage   \/\/assets.bonsai.sensu.io\/...\/check-memory-usage_0.2.2_darwin_amd64.tar.gz       57ebebe  \n  check-memory-usage   \/\/assets.bonsai.sensu.io\/...\/check-memory-usage_0.2.2_linux_armv7.tar.gz        6f7d0d2  \n  check-memory-usage   \/\/assets.bonsai.sensu.io\/...\/check-memory-usage_0.2.2_linux_arm64.tar.gz        94a41f3  \n  check-memory-usage   \/\/assets.bonsai.sensu.io\/...\/check-memory-usage_0.2.2_linux_386.tar.gz          125f9c1  \n  check-memory-usage   \/\/assets.bonsai.sensu.io\/...\/check-memory-usage_0.2.2_linux_amd64.tar.gz        663985d  \n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"create-sensu-monitoring-command-checks\"><a href=\"#create-checks-commands\">Create Sensu Monitoring Command Checks<\/a><\/h3>\n\n\n\n<p>Now that we have the monitoring plugin assets in place, you then need to create the monitoring command checks based to the dynamic monitoring assets installed.<\/p>\n\n\n\n<p>The command checks can be created using the command <code>sensuctl check create<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sensuctl check create --help<\/code><\/pre>\n\n\n\n<p>At the very list, you need to define the;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code><strong>--command\/-c<\/strong><\/code>: command to run and respective threshold parameters. E.G to use the check CPU usage runtime plugin installed above, <strong><code>check-cpu-usage -w 80 -c 90<\/code><\/strong>. This sets warning at 80% cpu usage and critical alert on 90% cpu usage.<\/li>\n\n\n\n<li><strong><code>--interval\/-i<\/code><\/strong>: interval, in seconds, at which the check is run<\/li>\n\n\n\n<li><code><strong>--subscriptions\/-s<\/strong><\/code>: comma separated list of topics check requests will be sent to.<\/li>\n\n\n\n<li><code><strong>--runtime-assets\/-r<\/strong><\/code>: comma separated list of assets this check depends on.<\/li>\n<\/ul>\n\n\n\n<p>Create Command check for CPU Usage<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sensuctl check create check_cpu -c 'check-cpu-usage -w 80 -c 90' -i 300 -s linux -r check-cpu-usage<\/code><\/pre>\n\n\n\n<p>Output should be <strong>Created<\/strong>.<\/p>\n\n\n\n<p>Create Command check for Disk Usage<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sensuctl check create check_disk -c 'check-disk-usage -w 75 -c 85' -i 300 -s linux -r check-disk-usage<\/code><\/pre>\n\n\n\n<p>Create Command check for Memory\/Swap Usage<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sensuctl check create check_mem -c 'check-memory-usage -w 75 -c 90' -i 300 -s linux -r check-memory-usage<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>sensuctl check create check_swap -c 'check-swap-usage -w 75 -c 90' -i 300 -s linux -r check-memory-usage<\/code><\/pre>\n\n\n\n<p>List Check commands;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sensuctl check list<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>     Name                 Command               Interval   Cron   Timeout   TTL   Subscriptions   Handlers         Assets         Hooks   Publish?   Stdin?   Metric Format   Metric Handlers  \n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n  check_cpu    check-cpu-usage -w 80 -c 90           300                0     0   linux                      check-cpu-usage              true       false                                     \n  check_disk   check-disk-usage -w 75 -c 85          300                0     0   linux                      check-disk-usage             true       false                                     \n  check_mem    check-memory-usage -w 75 -c 90        300                0     0   linux                      check-memory-usage           true       false                                     \n  check_swap   check-swap-usage -w 75 -c 90          300                0     0   linux                      check-memory-usage           true       false\n<\/code><\/pre>\n\n\n\n<p>You can also check the resource definition of a check using the command <strong><code>sensuctl check info [ID] [flags]<\/code><\/strong>;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sensuctl check info check_mem --format yaml<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>type: CheckConfig\napi_version: core\/v2\nmetadata:\n  created_by: sensuadmin\n  name: check_mem\n  namespace: default\nspec:\n  check_hooks: null\n  command: check-memory-usage -w 75 -c 90\n  env_vars: null\n  handlers: []\n  high_flap_threshold: 0\n  interval: 300\n  low_flap_threshold: 0\n  output_metric_format: \"\"\n  output_metric_handlers: null\n  pipelines: []\n  proxy_entity_name: \"\"\n  publish: true\n  round_robin: false\n  runtime_assets:\n  - check-memory-usage\n  secrets: null\n  stdin: false\n  subdue: null\n  subscriptions:\n  - linux\n  timeout: 0\n  ttl: 0\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"verify-sensu-remote-host-metrics-monitoring\">Verify Sensu Remote Host Metrics Monitoring<\/h3>\n\n\n\n<p>The agent remote metrics should now be available on the Sensu backend.<\/p>\n\n\n\n<p>Verify on command line;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sensuctl event list<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>   Entity      Check                                                                                                        Output                                                                                                     Status   Silenced             Timestamp                             UUID                  \n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n  debian11   check_cpu    check-cpu-usage OK: 22.16% CPU usage | cpu_idle=77.84, cpu_system=0.00, cpu_user=0.00, cpu_nice=0.00, cpu_iowait=22.16, cpu_irq=0.00, cpu_softirq=0.00, cpu_steal=0.00, cpu_guest=0.00, cpu_guestnice=0.00        0   false      2022-05-07 11:55:43 +0000 UTC   a5a590c3-779e-4ced-8d94-2c0fb3be3d5e  \n                                                                                                                                                                                                                                                                                                                                 \n  debian11   check_disk   check-disk-usage       OK: \/ 11.89% - Total: 16 GB, Used: 1.8 GB, Free: 13 GB                                                                                                                                     0   false      2022-05-07 11:53:55 +0000 UTC   b693cd32-0676-4c99-9a9a-1bd5a298a560  \n                                                                                                                                                                                                                                                                                                                                 \n  debian11   check_mem    check-memory-usage OK: 11.20% memory usage | mem_total=1023901696, mem_available=767492096, mem_used=114630656, mem_free=523784192                                                                                0   false      2022-05-07 11:54:06 +0000 UTC   911bc150-cd06-4f15-b6ab-f5e43a3140d9  \n                                                                                                                                                                                                                                                                                                                                 \n  debian11   check_swap   check-swap-usage OK: 0.00% swap usage | swap_total=1022357504, swap_free=1022357504, swap_used=0                                                                                                                  0   false      2022-05-07 11:55:06 +0000 UTC   3319f7d9-3c9f-4d49-8703-59a418f2c91c  \n                                                                                                                                                                                                                                                                                                                                 \n  debian11   keepalive    Keepalive last sent from debian11 at 2022-05-07 11:55:43 +0000 UTC                                                                                                                                                0   false      2022-05-07 11:55:44 +0000 UTC   7c0ce9a5-85e7-4504-a7f3-e9f77cc5cd09  \n  rocky8     check_cpu    check-cpu-usage OK: 1.27% CPU usage | cpu_idle=98.73, cpu_system=0.25, cpu_user=0.00, cpu_nice=0.00, cpu_iowait=0.00, cpu_irq=1.02, cpu_softirq=0.00, cpu_steal=0.00, cpu_guest=0.00, cpu_guestnice=0.00          0   false      2022-05-07 11:55:43 +0000 UTC   faf0e324-2721-42e7-8c65-e344ef5b3401  \n                                                                                                                                                                                                                                                                                                                                 \n  rocky8     check_disk   check-disk-usage       OK: \/ 42.33% - Total: 18 GB, Used: 7.7 GB, Free: 10 GB                                                                                                                                     0   false      2022-05-07 11:53:55 +0000 UTC   a6e74c49-9694-4c74-a63b-ab7d1b1694f5  \n                          check-disk-usage       OK: \/boot 33.89% - Total: 1.1 GB, Used: 360 MB, Free: 703 MB                                                                                                                                                                                                                    \n                                                                                                                                                                                                                                                                                                                                 \n  rocky8     check_mem    check-memory-usage OK: 61.59% memory usage | mem_total=1905209344, mem_available=567705600, mem_used=1173352448, mem_free=122142720                                                                               0   false      2022-05-07 11:54:06 +0000 UTC   ca52cfe3-1c02-45e2-aeb7-69bc5089d7f0  \n                                                                                                                                                                                                                                                                                                                                 \n  rocky8     check_swap   check-swap-usage OK: 14.89% swap usage | swap_total=2147479552, swap_free=1827684352, swap_used=319795200                                                                                                         0   false      2022-05-07 11:55:06 +0000 UTC   b7c1a0a0-9b71-4405-b8a3-df7af22d1f74  \n                                                                                                                                                                                                                                                                                                                                 \n  rocky8     keepalive    Keepalive last sent from rocky8 at 2022-05-07 11:55:53 +0000 UTC                                                                                                                                                  0   false      2022-05-07 11:55:53 +0000 UTC   78327f99-e4c5-4180-a8c8-2177feff1edc\n<\/code><\/pre>\n\n\n\n<p>From the Sensu Go dashboard, navigate to entities dashboard.<\/p>\n\n\n\n<p>For each asset entity, you should be able to check metric statistics;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1770\" height=\"848\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/sensu-asset-entity-metrics.png\" alt=\"\" class=\"wp-image-12619\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/sensu-asset-entity-metrics.png?v=1651925437 1770w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/sensu-asset-entity-metrics-768x368.png?v=1651925437 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/sensu-asset-entity-metrics-1536x736.png?v=1651925437 1536w\" sizes=\"(max-width: 1770px) 100vw, 1770px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1666\" height=\"816\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/sensu-asset-entity_metrics.png\" alt=\"\" class=\"wp-image-12620\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/sensu-asset-entity_metrics.png?v=1651925459 1666w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/sensu-asset-entity_metrics-768x376.png?v=1651925459 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/05\/sensu-asset-entity_metrics-1536x752.png?v=1651925459 1536w\" sizes=\"(max-width: 1666px) 100vw, 1666px\" \/><\/figure>\n\n\n\n<p>And that is just it on how Linux system metrics can be monitored using Sensu Go.<\/p>\n\n\n\n<p>Read more on Sensu documentation page.<\/p>\n\n\n\n<p>Other related tutorials<\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/monitor-process-creation-events-on-windows-systems-using-wazuh-and-elk-stack\/\" target=\"_blank\" rel=\"noreferrer noopener\">Monitor Process Creation Events on Windows Systems using Wazuh and ELK stack<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/monitor-windows-systems-using-elastic-osquery-manager\/\" target=\"_blank\" rel=\"noreferrer noopener\">Monitor Windows Systems using Elastic Osquery Manager<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, you will learn how to monitor Linux system metrics using Sensu. Sensu&nbsp;is an opensource infrastructure and application monitoring tool. You will learn<\/p>\n","protected":false},"author":1,"featured_media":12621,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[72,121],"tags":[5063,5064,5066,5065,5067],"class_list":["post-12607","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-monitoring","category-howtos","tag-monitor-linux-system-metrics-using-sensu","tag-sensu-check_cpu","tag-sensu-check_disk","tag-sensu-check_memory","tag-sensu-go-monitoring","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50","resize-featured-image"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/12607"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=12607"}],"version-history":[{"count":12,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/12607\/revisions"}],"predecessor-version":[{"id":20535,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/12607\/revisions\/20535"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/12621"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=12607"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=12607"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=12607"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}