Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
DoctorOgg committed Aug 25, 2021
0 parents commit 88839bc
Show file tree
Hide file tree
Showing 4 changed files with 662 additions and 0 deletions.
61 changes: 61 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
[![Sensu Bonsai Asset](https://img.shields.io/badge/Bonsai-Download%20Me-brightgreen.svg?colorB=89C967&logo=sensu)](https://bonsai.sensu.io/assets/DoctorOgg/sensu-check-http-go)
![goreleaser](https://github.com/DoctorOgg/sensu-check-http-go/workflows/goreleaser/badge.svg)

# sensu-check-http-go

## Table of Contents
- [Overview](#overview)
- [Files](#files)
- [Usage examples](#usage-examples)
- [Configuration](#configuration)
- [Asset registration](#asset-registration)
- [Check definition](#check-definition)
- [Installation from source](#installation-from-source)

## Overview

This is a simple http check plugin, it does not have all the features of the ruby version.

## Files

* sensu-check-http-go

## Usage examples

```bash
sensu-check-http-go -u https://google.com -c "oogle"

OK: https://google.com, status: 200, String found: oogle
```

## Configuration

### Asset registration

[Sensu Assets][10] are the best way to make use of this plugin. If you're not using an asset, please
consider doing so! If you're using sensuctl 5.13 with Sensu Backend 5.13 or later, you can use the
following command to add the asset:

```
sensuctl asset add DoctorOgg/sensu-check-http-go
```

If you're using an earlier version of sensuctl, you can find the asset on the [Bonsai Asset Index][https://bonsai.sensu.io/assets/DoctorOgg/sensu-check-http-go].

### Check definition

```yml
---
type: CheckConfig
api_version: core/v2
metadata:
name: sensu-check-http-go
namespace: default
spec:
command: sensu-check-http-go -u https://google.com -c "oogle"
subscriptions:
- system
runtime_assets:
- DoctorOgg/sensu-check-http-go
```
8 changes: 8 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module github.com/DoctorOgg/sensu-check-http-go

go 1.14
require (
github.com/sensu-community/sensu-plugin-sdk v0.11.0
github.com/sensu/sensu-go/api/core/v2 v2.3.0
github.com/sensu/sensu-go/types v0.3.0
)
Loading

0 comments on commit 88839bc

Please sign in to comment.