Git Product home page Git Product logo

sensu-plugins-windows's Introduction

Sensu-Plugins-Windows

Build Status Gem Version Appveyor status Community Slack

Functionality

These files provide basic Checks and Metrics for a Windows system.

Files

Ruby

  • bin/check-windows-cpu-load.rb
  • bin/check-windows-disk.rb
  • bin/check-windows-process.rb
  • bin/check-windows-processor-queue-length.rb
  • bin/check-windows-ram.rb
  • bin/check-windows-service.rb
  • bin/metric-windows-cpu-load.rb
  • bin/metric-windows-disk-usage.rb
  • bin/metric-windows-network.rb
  • bin/metric-windows-processor-queue-length.rb
  • bin/metric-windows-ram-usage.rb
  • bin/metric-windows-uptime.rb
  • bin/powershell_helper.rb

Powershell

  • bin/powershell/check-windows-cpu-load.ps1
  • bin/powershell/check-windows-disk.ps1
  • bin/powershell/check-windows-disk-writeable.ps1
  • bin/powershell/check-windows-pagefile.ps1
  • bin/powershell/check-windows-process.ps1
  • bin/powershell/check-windows-processor-queue-length.ps1
  • bin/powershell/check-windows-ram.ps1
  • bin/powershell/check-windows-service.ps1
  • bin/powershell/metric-windows-cpu-load.ps1
  • bin/powershell/metric-windows-disk-usage.ps1
  • bin/powershell/metric-windows-network.ps1
  • bin/powershell/metric-windows-processor-queue-length.ps1
  • bin/powershell/metric-windows-ram-usage.ps1
  • bin/powershell/metric-windows-uptime.ps1
  • bin/powershell/check-windows-directory.ps1
  • bin/powershell/check-windows-event-log.ps1
  • bin/powershell/check-windows-log.ps1

Usage

Example 1:

Execute Powershell functions using the helper (No copy needed), see example below:

  {
    "checks": {
      "cpu_percent": {
        "command": "c:\\opt\\sensu\\embedded\\bin\\ruby C:\\opt\\sensu\\embedded\\bin\\powershell_helper.rb check-windows-ram.ps1 90 95",
        "interval": 30,
        "type": "check",
        "handler": "win_metrics",
        "subscribers": ["win_metrics"]
      }
    }
  }
Example 2:
  • Copy either the Ruby or Powershell files on a Sensu Client, typically under C:\etc\sensu\plugins.

  • You should also include the full escaped path to the ruby interpreter in the check's command configuration, see example below:

  {
    "checks": {
      "cpu_percent": {
        "command": "c:\\opt\\sensu\\embedded\\bin\\ruby C:\\opt\\sensu\\etc\\plugins\\metric-windows-cpu-load.rb",
        "interval": 30,
        "type": "metric",
        "handler": "win_metrics",
        "subscribers": ["win_metrics"]
      }
    }
  }

You should also include the full escaped path to the ruby interpreter in the check's command configuration, see example below:

{
  "checks": {
    "cpu_percent": {
      "command": "c:\\opt\\sensu\\embedded\\bin\\ruby C:\\opt\\sensu\\etc\\plugins\\metric-windows-cpu-load.rb",
      "interval": 30,
      "type": "metric",
      "handler": "win_metrics",
      "subscribers": ["win_metrics"]
    }
  }
}

Dependencies

  • Powershell checks require Powershell version 3.0 or higher.

Troubleshooting

  • Failures to pull counter data with messages like below, might be due to corrupt performance counters. See Here for more information. Short answer on fix is lodctr /R in an Admin elevated command prompt

Check failed to run: undefined method length' for nil:NilClass, "c:/opt/sensu/plugins/check-windows-ram.rb:45:inacquire_ram_usage'", "c:/opt/sensu/plugins/check-windows-ram.rb:54:in run'", "c:/opt/sensu/embedded/lib/ruby/gems/2.0.0/gems/sensu-plugin-1.

Installation

Installation and Setup

sensu-plugins-windows's People

Contributors

majormoses avatar tas50 avatar eheydrick avatar absolutejam avatar mattyjones avatar ajeba99 avatar kalininsn avatar manul7 avatar patricewhite avatar csabo avatar hulkk avatar dependabot-support avatar seji64 avatar bodgit avatar florinandrei avatar andyroyle avatar vardyb avatar derekgroh avatar dalesit avatar jgnagy avatar analytically avatar sensu-plugin avatar magmax avatar shoekstra avatar jasiek191 avatar makaveli0129 avatar stevebanik-ndsc avatar simonsteur avatar

Watchers

James Cloos 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.