Skip to content

Instantly share code, notes, and snippets.

@asachs01
Last active February 19, 2019 21:44
Show Gist options
  • Save asachs01/0f8b3ec530fc9a8201bb7b26a5055d33 to your computer and use it in GitHub Desktop.
Save asachs01/0f8b3ec530fc9a8201bb7b26a5055d33 to your computer and use it in GitHub Desktop.

ChaDevOps

Create your own check

We're going to do a few things here:

  1. Monitor a single website
  2. Create some proxy entities
  3. Monitor those proxy entities

Before we get started, if you want to change the websites monitored here, you can. They're listed at the following:

go/config/checks/check-http.yaml go/config/entities/proxy_entities.yaml

Walkthrough:

  1. Create the http check:

sensuctl create -f go/config/checks/check-http.yaml

  1. Check that the check was created

sensuctl check list

  1. Create some proxy entities

sensuctl create -f go/config/entities/proxy_entities.yaml

  1. Verify that our entities were created

sensuctl entity list

  1. Create a http proxy check:

sensuctl create -f go/config/checks/check-http-proxy.yaml

Boom! You've done it! You have created your own checks.

But thats super noisy. What about filters?

Create a filter

  1. Create the filter

sensuctl create -f go/config/filters/filter_interval_60_hourly.yml

  1. Update the handler to use the filter

Everything will be the same except for the filter list:

is_incident,not_silenced,filter_interval_60_hourly

We'll see this applied at the end of the demo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment