GithubHelp home page GithubHelp logo

isabella232 / sensu-go-load-check Goto Github PK

View Code? Open in Web Editor NEW

This project forked from disqus/sensu-go-load-check

0.0 0.0 0.0 43 KB

This plugin provides native load instrumentation including load health and per-core metrics

License: MIT License

Go 100.00%

sensu-go-load-check's Introduction

Bonsai Asset Badge TravisCI Build Status

Sensu Go Load Check

Overview

This plugin provides native load instrumentation including load health and per-core metrics. The sensu-go-load-check check takes the flags -w (warning) and -c (critical) and a desired L1/L5/L15. By default, these are a warning value of 2.75, 2.5, 2.0 and a critical value of 3.5, 3.25, 3.0. 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 Load usage

Usage:
  sensu-go-load-check [flags]

Flags:
  -c, --critical string   Critical value for system load (default "3.5, 3.25, 3.0")
  -h, --help              help for sensu-go-load-check
  -w, --warning string    Warning value for system load. (default "2.75, 2.5, 2.0")

Example Output

./sensu-go-load-check
CheckLoad OK - value = 0.14, 0.10, 0.07 | core_load_1=0.14, core_load_5=0.10, core_load_15=0.07

Configuration

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 Salamek/sensu-go-load-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
metadata:
  name: sensu-go-load-check
  namespace: CHANGEME
  labels: {}
  annotations: {}
spec:
  url: https://github.com/Salamek/sensu-go-load-check/releases/download/0.0.1/sensu-go-load-check_0.0.1_linux_amd64.tar.gz
  sha512:
  filters:
  - 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:

sensu-go-load-check

type: CheckConfig
api_version: core/v2
metadata:
  name: sensu-go-load-check
  namespace: CHANGEME
spec:
  command: sensu-go-load-check
  runtime_assets:
  - sensu-go-load-check
  interval: 60
  publish: true
  output_metric_format: nagios_perfdata
  output_metric_handlers:
  - influxdb
  handlers:
  - slack
  subscriptions:
  - 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-load-check repository:

sensu-go-load-check

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

To contribute to this repo, see https://github.com/sensu/sensu-go/blob/master/CONTRIBUTING.md.

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

sensu-go-load-check's People

Contributors

espenaf avatar salamek avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.