Adding a CPU check

Having sufficient CPU resources is a vital part of running a performant service and it is hard to spot without sufficient monitoring. Using Sensu to alert when CPU usage is running high, you will be able to deal with slow running processes before the customer notices.

Getting ready

For this recipe, you will need both a Sensu server and at least one Sensu host. You should also have installed the prerequisite packages as detailed in the recipe Installing check prerequisites.

How to do it…

Let's add a CPU usage check:

  1. First, we install the CPU check gem using the Gem package manager. Use the following command to install the plugin:
    $ sudo gem install sensu-plugins-cpu-checks
    
  2. Now we can configure the check configuration. On the Sensu ...

Get Learning DevOps: Continuously Deliver Better Software now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.