Select Supported Platforms

Select Supported Architectures

Select Tier

Github Name


v1.0.3 · public · Published over 3 years ago

README
Asset Definition
Release Notes
Release Assets

Sensu Bonsai Asset
Build Status

Sensu Go Uptime Check Plugin

Overview

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).

Files

N/A

Usage examples

Help

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

Configuration

Sensu Go

Asset registration

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

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-checks repository:

go build -o /usr/local/bin/sensu-go-uptime-checks main.go

Asset definition

---
type: Asset
api_version: core/v2
metadata:
  name: sensu-go-uptime-checks
spec:
  url: https://assets.bonsai.sensu.io/1f967e65880ead0b4bfe13e331b3fc6f26ebfed2/sensu-go-uptime-checks_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.

Handler definition

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-checks
  interval: 60
  publish: true
  output_metric_format: nagios_perfdata
  output_metric_handlers:
  - infuxdb
  handlers:
  - slack
  subscriptions:
  - system

Sensu Core

N/A

Installation from source

Sensu Go

See the instructions above for asset registration.

Sensu Core

Install and setup plugins on Sensu Core.

Additional notes

Supported Operating Systems

This project uses gopsutil and thus depends on the systems that it supports. For this plugin, the following operating systems are supported:

  • Linux
  • FreeBSD
  • OpenBSD
  • Mac OS X
  • Windows (states not supported, but I've confirmed that it is)
  • Solaris

Example output

screenshot_of_check_result

Contributing

See the Sensu Go repository CONTRIBUTING.md for information about contributing to this plugin.

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