Select Supported Platforms

Select Supported Architectures

Select Tier

Github Name


v0.0.6 · public · Published 5 months ago

README
Asset Definition
Release Notes
Release Assets

Sensu Bonsai Asset
goreleaser

sensu-check-http-json

Table of Contents

Overview

This Sensu plugin performs HTTP checks and extracts values from JSON responses using jq queries. It supports basic comparison operations and handles TLS verification options.

Files

  • sensu-check-http-json

Usage examples

$ sensu-check-http-json -u https://jsonplaceholder.typicode.com/posts/1 -q "userId" -e "> 1"

OK: URL https://jsonplaceholder.typicode.com/posts/1, extracted value: 1, expression check passed: 1 > 1

Help:

$ sensu-check-http-json -h

A Sensu plugin to perform HTTP checks and extract values from JSON responses.

Usage:
  sensu-check-http-json [flags]
  sensu-check-http-json [command]

Available Commands:
  help        Help about any command
  version     Print the version number of this plugin

Flags:
  -d, --debug                  Enable debug mode
  -e, --expression string      Expression for comparing result of query
  -h, --help                   help for sensu-check-http-json
  -i, --insecure-skip-verify   Skip TLS certificate verification (not recommended!)
  -q, --query string           Query for extracting value from JSON
  -T, --timeout int            Request timeout in seconds (default 15)
  -u, --url string             URL to test (default "http://localhost:80/")

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-json

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

Check definition

---

type: CheckConfig
api_version: core/v2
metadata:
  name: sensu-check-http-json
  namespace: default
spec:
  command: sensu-check-http-json -u <https://jsonplaceholder.typicode.com/posts/1> -q "userId" -e "> 1"
  subscriptions:

- system
  runtime_assets:
- DoctorOgg/sensu-check-http-json

Are you sure you want to report this asset?

Please describe the reason for reporting this asset. Our moderators will be notified and will disable the asset if it is found to be inappropriate.

×

You must be signed in to report this asset.

Sign In with Github

Download

×

There are no asset definitions for this version, only source code:

Download Source Cancel