Difficulty: beginner
Estimated Time: 5-10 minutes

Welcome to Sensu Checks 101.

In this lesson, we're going to cover checks basics. By the end of the lesson, you should be familiar enough with checks to start writing your own.

That brings us to the end of this scenario. In the next scenario, we'll learn more about creating a pipeline so that we can take action on our checks.

We hope you've found this lesson useful, and that you'll join us in the next scenario as we dive into the event pipeline.

You can find the source for this scenario in GitHub.

Checks 101

Step 1 of 3

What is a check?

Let's first start by answering the question, "What is a check?" A check is a fundamental building block that either determines the status of, or gathers metrics from a system. So we have "status" checks and "metric" checks.

Let's take a look at an example status check configuration:

api_version: core/v2
type: CheckConfig
metadata:
  namespace: default
  name: check-cpu
spec:   
  command: check-cpu.sh -w 75 -c 90
  subscriptions:
  - system
  handlers:
  - slack
  publish: true
  interval: 60

Here, we're running a command to check our CPU utilization to see if it rises above a given threshold. Let's dissect this check.

Resources