License
MIT License
The sensu-etcd-check is a Sensu Check that connects to one or more etcd cluster
endpoints and reports the database size reported by etcdctl endpoint status. The check goes
critical when the database size exceeds a configurable threshold, which is useful for catching
etcd clusters approaching their configured storage quota before they hit it and go read-only.
Usage:
check-etcd [flags]
Flags:
-c, --cert-file string Path to the cert
-h, --help help for check-etcd
-k, --key-file string Path to the key
-s, --size int Maximum database Size (default 1500000000)
-t, --timeout int Request timeout (default 5)
--trusted-ca-file string Path to the CA file
-u, --url strings Url of etcd instance(s) (default [http://127.0.0.1:2379])
--url accepts a comma-separated list of endpoints; the check queries the status of the--size is the maximum acceptable DbSize in bytes before the check returns critical.--cert-file, --key-file, and --trusted-ca-file must all be provided together to enableSensu 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 elfranne/sensu-etcd-check
If you're using an earlier version of sensuctl, you can find the asset on the Bonsai Asset Index.
---
type: CheckConfig
api_version: core/v2
metadata:
name: sensu-etcd-check
namespace: default
spec:
command: sensu-etcd-check --url http://127.0.0.1:2379 --size 1500000000
subscriptions:
- etcd
runtime_assets:
- elfranne/sensu-etcd-check
A TLS-enabled example, for clusters using client certificate authentication:
---
type: CheckConfig
api_version: core/v2
metadata:
name: sensu-etcd-check
namespace: default
spec:
command: >-
sensu-etcd-check
--url https://127.0.0.1:2379
--cert-file /etc/etcd/ssl/etcd-client.crt
--key-file /etc/etcd/ssl/etcd-client.key
--trusted-ca-file /etc/etcd/ssl/ca.crt
subscriptions:
- etcd
runtime_assets:
- elfranne/sensu-etcd-check
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 script from this source.
From the local path of the sensu-etcd-check repository:
go build
The check only queries the status of the first endpoint in --url; additional endpoints are
passed through to the etcd client for connection purposes but are not each individually checked.
For more information about contributing to this plugin, see Contributing.
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.
×