Skip to content

Instantly share code, notes, and snippets.

View asachs01's full-sized avatar
Caffeinated.

Aaron Sachs asachs01

Caffeinated.
View GitHub Profile
---
- name: Install, configure and run Sensu backend in debug mode
hosts: monitoring-sensu
remote_user: centos
become: true
become_method: sudo
collections: [sensu.sensu_go]
roles:
- role: backend
backend_config:

The Project

The goal of The Project is to provide a base-level project for folks with technical aptitude who want to start diving into systems administration.

The Instructions.

The instructions here are purposefully vague and only provided from a high-level overview. The goal is to work through the project and learn about commonly used technologies

  1. Get a VM from a cloud provider. DigitalOcean, Amazon Lightsail, Hostgator, Godaddy, wherever. The goal here is that you must have SSH access to the box.

  2. Purchase a domain name. You can use whatever provide you like: domains.google, namecheap.com, cloudflare.com. Again, it doesn't matter where you get the domain name.

@asachs01
asachs01 / create_sensu_user_group.sh
Created May 17, 2019 15:54
Running Sensu on OSX
#!/bin/sh
create_sensu_user_group()
{
# create sensu group
set +e
dscl . -list /Groups | grep "^_sensu" > /dev/null
RC=$?
set -e
if [ "${RC}" != "0" ]; then
@asachs01
asachs01 / sensu-agent.service
Created May 15, 2019 20:09
Systemd unit files for sensu-agent and sensu-backend
[Unit]
Description=The Sensu Agent process.
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=sensu
Group=sensu
# Load env vars from /etc/default/ and /etc/sysconfig/ if they exist.

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:

@asachs01
asachs01 / proxy-entities.yml
Created February 18, 2019 20:01
Sensu proxy entities
---
type: Entity
api_version: core/v2
metadata:
name: sensu-docs
namespace: demo
labels:
proxy_type: website
url: https://docs.sensu.io
spec:
@asachs01
asachs01 / check-http-proxy.yaml
Created February 18, 2019 20:00
Http proxy check for Sensu Go
---
api_version: core/v2
type: CheckConfig
metadata:
namespace: demo
name: check-http-proxy
spec:
runtime_assets:
- check-plugins
command: check-http -u {{ .labels.url }} -r true
@asachs01
asachs01 / tupelo-honey-biscuits-metric.md
Created February 18, 2019 19:04
Metric conversion of my standard recipe.

Tupelo Honey Buttermilk Biscuits

Ingredients

Makes 10 biscuits

  • 240 grams White Lily self-rising flour
  • 12 grams sugar
  • 2.5 grams teaspoon salt
  • 75 grams chilled shortening (or butter), cut into pieces
@asachs01
asachs01 / tupelo-honey-biscuits.md
Last active November 21, 2021 23:37
My standard recipe for biscuits.

Tupelo Honey Buttermilk Biscuits

Ingredients

Makes 10 biscuits

  • 2 cups White Lily self-rising flour
  • 1 tablespoon sugar
  • ½ teaspoon salt
  • ⅓ cup chilled shortening, cut into pieces (I use butter)
@asachs01
asachs01 / check-http.yaml
Created January 28, 2019 18:34
Simple Sensu Go http check
api_version: core/v2
type: CheckConfig
metadata:
namespace: demo
name: check-http-google
spec:
runtime_assets:
- check-plugins
command: check-http -u https://google.com -r true
proxy_entity_name: "google.com"