Learn Sensu Go

Lesson 1: Welcome + what to expect

Welcome to the Learn Sensu Go course! Over the next 8 lessons, you’ll learn how to:

  • Create monitoring events
  • Get started with sensuctl (our command-line tool) and the Sensu dashboard
  • Build monitoring event pipelines
  • Automate event production with the Sensu agent
  • Collect metrics using Sensu checks
  • Discover and share Sensu solutions with assets
  • Scale Sensu with license-activated features

That sounds like a lot, but we promise we’ll keep it straightforward, making it easy for you to learn at your own pace! If you get stuck, join us on Discourse to get answers from the Sensu Community.

Lesson 2: The Sensu Go sandbox, installation, & your first lesson

In the first Learn Sensu Go lesson, we’ll cover setting up your Sensu testing environment and creating a monitoring event.

Set up your Sensu Go testing environment

Managed with Vagrant and VirtualBox, our sandbox makes it easy to take Sensu Go for a spin. Bonus: it comes pre-configured with InfluxDB and Grafana, so you can get up and running (and building monitoring pipelines!) in no time.

When you’re ready to install Sensu Go on your infrastructure, it’s available on Linux, Windows (agent and CLI only), macOS (CLI only), and Docker. Follow our docs for a complete guide to installing Sensu Go, which will take you through installing the Sensu backend, agent, and sensuctl (more on sensuctl next time!).

Create your first monitoring event

After you’ve downloaded the sandbox, you’re ready to start creating monitoring workflows with Sensu! Follow the first lesson to create your first monitoring event — using a Sensu agent to generate keepalive events.

In the next lesson, we’ll cover sensuctl (the Sensu command-line tool) and the dashboard, as well as get you started with RBAC. If you get stuck (now or at any point during the course), take a look at our troubleshooting guide.

Lesson 3: Using sensuctl and the Sensu dashboard, plus RBAC

In this lesson, you’ll learn about sensuctl, the command-line tool for managing resources within Sensu, and the Sensu dashboard. And, to easily share Sensu with your organization, we’ll also walk you through setting up RBAC.

Setting up + using sensuctl

Now that you’ve gotten started with sensuctl using the sandbox, install sensuctl on your workstation by following the steps outlined in our docs. You can set up sensuctl to talk to your sandbox or connect to the Sensu live demo. For a handy cheat sheet of sensuctl commands, check out our quick reference guide.

The Sensu dashboard

The Sensu backend includes the Sensu dashboard: a unified view of your events, entities, handlers, and checks with user-friendly tools to reduce alert fatigue. You can access the sandbox dashboard at localhost:3002/signin (username admin, password P@ssw0rd!, or check out the live demo (username guest, password i<3sensu).

Securing + sharing Sensu with RBAC

Role-based access control (RBAC) is an authorization mechanism that decides which actions users can perform against resources. With Sensu RBAC, you can increase security in your organization (keeping that InfoSec team happy!) by providing only the necessary access, so a user in your organization doesn’t have more access than needed. Plus, RBAC makes it easy for different teams and projects to share a Sensu instance (AKA, paving the way for multitenancy).

In the next lesson, you’ll create your first pipeline with handlers and learn how to reduce alert fatigue 😴 with event filters.

Lesson 4: Create your first pipeline with filters and handlers

Welcome to part 4! In this lesson, we’ll cover setting up your first pipeline — sending alerts to Slack — and how to reduce alert fatigue with event filters.

How to send alerts to Slack with a handler

Sensu handlers are the basis for all monitoring workflows. You can use handlers to send an email alert, create (or resolve!) an incident in PagerDuty, or store metrics in a TSDB like InfluxDB. In this sandbox lesson, you’ll create a handler that sends keepalive alerts to Slack.

Reducing alert fatigue with filters

Sensu filters are powerful valves for the monitoring event pipeline. They let you fine-tune notification policies tied to handlers, improving the signal-to-noise ratio and reducing alert fatigue. In the following guide, you’ll create a custom event filter and add it to your Slack alert pipeline.

See the reference docs for a deep dive on handlers and filters. In the next lesson, we’ll cover service checks, which let you monitor server resources, services, and application health.

Lesson 5: Checks and the Sensu agent

In this installment, you’ll learn about Sensu checks, how to monitor server resources with checks, and take a look at tokens, an advanced check feature.

Automate event production with the Sensu agent

The Sensu agent runs on the infrastructure components you want to monitor, automatically registering as a monitored entity with the Sensu backend. These agent entities are responsible for creating check and metric events to send to the backend event pipeline. Learn all about it below, including the magic ✨ of subscriptions (which let you create monitoring events using service checks).

Monitoring server resources with checks

Sensu checks are commands (or scripts), executed by the Sensu agent, that output data and produce an exit code to indicate a status. You can use them to monitor server resources, services, and application health (for example: is Nginx running?) as well as collect and analyze metrics (for example: how much disk space do I have left?). Sensu checks use the same specification as Nagios, meaning you can use Nagios check plugins with Sensu (hooray!).

For extra credit (AKA, fine tuning check attributes like alert thresholds, on a per-entity level) check out tokens. For everything and anything you’d like to know about checks (including scheduling and proxy checks), take a look at our reference docs.

In the next lesson, you’ll learn about using checks to extract metrics automatically, plus guides on aggregating StatsD and Prometheus metrics.

Lesson 6: Extracting metrics with Sensu checks

In this lesson, we’ll build on what you’ve learned about checks to extract metrics using checks (plus guides on aggregating StatsD and Prometheus metrics).

Store metrics with InfluxDB and visualize them with Grafana

In this sandbox lesson, you’ll automate event production with the Sensu agent — creating a check that automatically produces metric events. We’ll then store those metrics with InfluxDB and visualize them with Grafana.

Aggregate metrics with the Sensu StatsD listener

StatsD, in case you’re not familiar, is a daemon, tool, and protocol that can be used to send, collect, and aggregate custom metrics — it essentially allows you to measure anything and everything, so you can feed those StatsD aggregates to multiple different backends or visualize your data. In this guide, you’ll learn how Sensu implements StatsD and how to configure our StatsD listener.

Using the Sensu Prometheus Collector

The Sensu Prometheus Collector is a check plugin that collects metrics from a Prometheus exporter or the Prometheus query API. This allows you to use Sensu to collect metrics exposed by Prometheus node exporters and route them to one or more TSDBs of your choosing (like InfluxDB or Graphite).

That was a lot of info, so thanks for sticking with us! In the next lesson, we’ll cover monitoring containers and deploying Sensu with Docker.

Lesson 7: Container monitoring and Docker installation

Welcome to the container edition of our course! In this lesson, you’ll learn how to monitor applications and containers with Sensu, plus how to deploy Sensu with Docker.

Container & application monitoring with Sensu

Deploy a sample app with Kubernetes and add monitoring with Sensu. In this tutorial, you’ll create monitoring event pipelines to handle alerts and collect metrics using the Sensu agent sidecar pattern.

Deploy Sensu with Docker

You can run Sensu Go via Docker or rkt using the sensu/sensu image. The following guide walks you through how to deploy Sensu with Docker, outlining a few important things to take into consideration.

Deploy a Sensu stack with Docker Compose

The Sensu Go Docker sandbox uses Docker Compose to deploy a basic Sensu stack, including InfluxDB to store metrics and Grafana for visualization.

In the next lesson, we’ll go over Bonsai (the Sensu asset index) and how to install plugins using assets.

Lesson 8: Assets and how to contribute to Bonsai

Welcome to part 8! In this lesson, you’ll learn about Bonsai, the Sensu asset index. We’ll also go over how to use assets to install plugins.

Explore Bonsai, the Sensu asset index

Bonsai enables you to discover, create, and share Sensu assets for all your monitoring needs. Head on over to Bonsai to discover Sensu solutions (including our Slack, InfluxDB, and PagerDuty handlers). Connect with the Sensu Community by seeing what others are building (and sharing your own solutions!).

How to install plugins using assets

If you’ve been using Sensu for a while, you may well know that plugins extend Sensu’s functionality. Plugins can provide executables for performing status or metric checks, changing data to a desired format, or taking action on a Sensu event.

Assets are shareable, reusable packages that make it easy to deploy Sensu plugins. You can use assets to provide the plugins, libraries, and runtimes you need to automate your monitoring workflows. See the asset reference docs for more info, and follow the guide below to learn how to install plugins using assets.

Share your assets on Bonsai!

Now that you’re familiar with assets, you can start creating and sharing your own on Bonsai! Bonsai supports assets hosted on GitHub and released using GitHub releases. For more info and configuration examples, check out the guide below.

In the next (and final!) installment of this course, we’ll go over some particularly cool license-activated features (including the top three enterprise assets on Bonsai) and how to get started with a Sensu license.

Lesson 9: License-activated features and assets, and Sensu 1.x migration

Congratulations on making it to the end of our course! In this installment, we’ll highlight some neat features that you can unlock with a Sensu license (and how to get one!). In addition to first-class support and monitoring at scale, a Sensu license offers key features like API filtering, aggregate checks, and critical integrations (like ServiceNow and Jira).

The top 3 enterprise assets in Bonsai

In addition to community contributed assets, Bonsai offers hosted assets that you can unlock with a Sensu license. Here are the top three most downloaded assets:

  • The ServiceNow handler, a Sensu event handler that creates, updates, and resolves ServiceNow incidents and events.
  • The Jira handler, a Sensu event handler that creates, updates, and resolves Jira issues.
  • The aggregate check plugin, which allows you to alert on combinations of events, giving you even more powerful tools to reduce alert fatigue.

Resource filtering in the Sensu Go API & dashboard

Designed for large installations, label and field selectors let you filter Sensu API responses, sensuctl outputs, and Sensu dashboard views using custom labels and a wider range of resource attributes.

For a full list of license-activated features — plus how to get started — check out the guide below.

Migrate from Sensu 1.x to Sensu Go

Using Sensu 1.x? Now that you know (and hopefully love!) Sensu Go, you’re ready to migrate from Sensu 1.x. This guide walks you through the differences, with helpful resources for translating your Sensu 1.x configuration to Sensu Go.

That’s it for this course, but of course you’re welcome to revisit the lessons any time and to join us in Discourse to share your questions and what you’ve learned with the Sensu Community.

Happy monitoring!

Related Resources

Podcast

Food Fight Show: #monitoringlove with Sensu

Whitepaper

Alert fatigue: avoidance and course correction

Webinar

What’s new in Sensu Go

Ready to get started?

Learn more about what we offer to find the option that is right for you, or talk directly to our sales team to get started.