This plugin provides a check for system uptime for Sensu Go. The
sensu-go-uptime-check check takes the flags
-w (warning) and
-c (critical) and a time duration after each flag (e.g. 24h). The time values can be represented in seconds (s), minutes (m), or hours (h). The plugin uses a default warning value of 72h and a default critical value of 168h (1 week).
The Sensu Go check for system uptime Usage: sensu-go-uptime-check [flags] Flags: -w, --warning (time in s,m,h) Warning value in seconds, minutes, or hours, default is 72 hours (72h) -c, --critical (time in s,m,h) Warning value in seconds, minutes, or hours default is 1 week (168h) -h, --help help for sensu-go-uptime-status
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 or later, you can use the following command to add the asset:
sensuctl asset add asachs01/sensu-go-uptime-check
If you're using an earlier version of sensuctl, you can download the asset definition from this project's Bonsai asset index page, download a copy of the handler plugin from releases, or create an executable script from this source.
From the local path of the sensu-go-uptime-check repository:
go build -o /usr/local/bin/sensu-go-uptime-check main.go
--- type: Asset api_version: core/v2 metadata: name: sensu-go-uptime-check spec: url: https://assets.bonsai.sensu.io/1f967e65880ead0b4bfe13e331b3fc6f26ebfed2/sensu-go-uptime-check_1.0.1_linux_amd64.tar.gz sha512: 3d732f21611bb03dddc529c46b1bffd2b97f2a5b5ae7a935964a179adb26d5ccffa3ffaf0662380be4485d6d5e4295b0812ef1d22919e02ebb412c4eef1aff24
NOTE: Make sure to update the URL and SHA512 before you use the asset. If you don't, you might be using an older version.
type: CheckConfig api_version: core/v2 metadata: name: sensu-go-uptime-check namespace: CHANGEME spec: command: sensu-go-uptime-check runtime_assets: - sensu-go-uptime-check interval: 60 publish: true output_metric_format: nagios_perfdata output_metric_handlers: - infuxdb handlers: - slack subscriptions: - system
See the instructions above for asset registration.
Install and setup plugins on Sensu Core.
See the Sensu Go repository CONTRIBUTING.md for information about contributing to this plugin.
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.×