Skip to content

alasconnect/sensu-consul-check

 
 

Repository files navigation

Sensu Bonsai Asset Go Test goreleaser

Check Consul service health

Table of Contents

Overview

The sensu-consul-check is a Sensu Check that queries the health of Consul service health checks. It is a golang update of the check-consul-service-health.rb script in the sensu-plugins-consul repository.

Usage examples

Help output

Consul Service Health Check

Usage:
  sensu-consul-check [flags]
  sensu-consul-check [command]

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

Flags:
  -c, --consul-server string     Consul server URL (default "http://127.0.0.1:8500")
  -A, --acl-token string         ACL token for connecting to Consul
  -a, --all                      Get all services (not compatible with --tags)
  -n, --node string              Check all Consul service running on the specified node
  -s, --service string           Service managed by Consul to check (default "consul")
  -t, --tags strings             Filter services by a comma-separated list of tags (requires --service)
  -f, --fail-if-not-found        Fail if no service is found
  -T, --trusted-ca-file string   TLS CA certificate bundle in PEM format
  -i, --insecure-skip-verify     Skip TLS certificate verification (not recommended!)
  -h, --help                     help for sensu-consul-check

Use "sensu-consul-check [command] --help" for more information about a command.

Configuration

Asset registration

Sensu Assets 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 sensu/sensu-consul-check

If you're using an earlier version of sensuctl, you can find the asset on the Bonsai Asset Index.

Check definition

---
type: CheckConfig
api_version: core/v2
metadata:
  name: sensu-consul-check
  namespace: default
spec:
  command: >-
    sensu-consul-check
    --consul-server http://127.0.0.1:8500
    --all
  subscriptions:
  - system
  runtime_assets:
  - sensu/sensu-consul-check

Installation from source

The preferred way of installing and deploying this plugin is to use it as an Asset. If you would like to compile and install the plugin from source or contribute to it, download the latest version or create an executable from this source.

From the local path of the sensu-consul-check repository:

go build

Contributing

For more information about contributing to this plugin, see Contributing.

About

Check Consul service health

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%