Select Supported Platforms

Select Supported Architectures

Select Tier

Github Name

v0.0.6 · public · Published over 3 years ago

Asset Definition
Release Notes
Release Assets

Bonsai Asset Badge TravisCI Build Status

Sensu Go CPU Check


This plugin provides a check for system CPU utilization for Sensu Go. The sensu-go-cpu-check check takes the flags -w (warning) and -c (critical) and a desired duration utilization percentage after each flag. By default, these are a warning value of 75% and a critical value of 90%. This check also outputs data as nagios_perfdata(for more information, see this Nagios documentation article. This allows for the check to be used as both a status check and a metric check. You can see an example of this in the example check definition below.

Usage Examples

Command line help

The Sensu Go check for system CPU usage

  sensu-go-cpu-check [flags]

  -c, --critical string   Critical value for system cpu (default "90")
  -h, --help              help for sensu-go-cpu-check
  -w, --warning string    Warning value for system cpu. (default "75")

Example Output

CheckCPU OK - value = 39.50 | system_cpu=39.50


Asset registration

Assets are the best way to make use of this check. If you're not using this plugin as an asset, please consider doing so! If you're using Sensu 5.13 or later, you can install this plugin as an asset by running:

sensuctl asset add asachs01/sensu-go-cpu-check

Else, you can find this asset on the Bonsai Asset Index.

Asset definition

You can download the asset definition there, or you can do a little bit of copy/pasta and use the one below:

type: Asset
api_version: core/v2
  name: sensu-go-cpu-check
  namespace: CHANGEME
  labels: {}
  annotations: {}
  - entity.system.os == 'linux'
  - entity.system.arch == 'amd64'

NOTE: PLEASE ENSURE YOU UPDATE YOUR URL AND SHA512 BEFORE USING THE ASSET. If you don't, you might just be stuck on a super old version. Don't say I didn't warn you ¯\(ツ)

Check definition

Example Sensu Go definition:


type: CheckConfig
api_version: core/v2
  name: sensu-go-cpu-check
  namespace: CHANGEME
  command: sensu-go-cpu-check -w 80 -c 95
  - sensu-go-cpu-check
  interval: 60
  publish: true
  output_metric_format: nagios_perfdata
  - influxdb
  - slack
  - system

Installation from source and contributing

While it's generally recommended to use an asset, you can 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-cpu-check repository:


go build -o /usr/local/bin/sensu-go-cpu-check main.go

To contribute to this repo, see

Additional notes

Supported operating systems

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

  • Linux
  • FreeBSD
  • OpenBSD
  • Mac OS X
  • Windows
  • Solaris

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



Either download the source code:

Download Source

Or download the asset definition: