sensu-plugins-windows 0.0.10 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -13
- data/CHANGELOG.md +59 -29
- data/README.md +47 -8
- data/bin/check-windows-cpu-load.rb +3 -6
- data/bin/check-windows-disk.rb +10 -12
- data/bin/check-windows-process.rb +3 -4
- data/bin/check-windows-processor-queue-length.rb +47 -0
- data/bin/check-windows-ram.rb +4 -7
- data/bin/check-windows-service.rb +5 -12
- data/bin/{metrics-windows-cpu-load.rb → metric-windows-cpu-load.rb} +4 -10
- data/bin/{metrics-windows-disk-usage.rb → metric-windows-disk-usage.rb} +3 -9
- data/bin/{metrics-windows-network.rb → metric-windows-network.rb} +3 -5
- data/bin/metric-windows-processor-queue-length.rb +58 -0
- data/bin/{metrics-windows-ram-usage.rb → metric-windows-ram-usage.rb} +4 -9
- data/bin/{metrics-windows-uptime.rb → metric-windows-uptime.rb} +3 -5
- data/bin/powershell/check-windows-cpu-load.ps1 +49 -0
- data/bin/powershell/check-windows-disk-writeable.ps1 +89 -0
- data/bin/powershell/check-windows-disk.ps1 +81 -0
- data/bin/powershell/check-windows-http.ps1 +56 -0
- data/bin/powershell/check-windows-process.ps1 +42 -0
- data/bin/powershell/check-windows-processor-queue-length.ps1 +49 -0
- data/bin/powershell/check-windows-ram.ps1 +51 -0
- data/bin/powershell/check-windows-service.ps1 +48 -0
- data/bin/powershell/metric-windows-cpu-load.ps1 +35 -0
- data/bin/powershell/metric-windows-disk-usage.ps1 +45 -0
- data/bin/powershell/metric-windows-network.ps1 +35 -0
- data/bin/powershell/metric-windows-processor-queue-length.ps1 +35 -0
- data/bin/powershell/metric-windows-ram-usage.ps1 +35 -0
- data/bin/powershell/metric-windows-uptime.ps1 +34 -0
- data/lib/sensu-plugins-windows/version.rb +2 -2
- metadata +57 -71
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
MWYyMWViYTVmYTUyOWNmMjEzNjM4OTZhMDI0MzEyNDgzYmI0ZWYyMA==
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: f1585766cf7f2f5649ae6958bd4f98ea53e06563
|
4
|
+
data.tar.gz: 79190644e127daba3a7fb66a6a883db18a1fc58f
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
MDIzNmZkODI4NjE5OTU2Yjg4MWQzMGQ4YmEyNDBmOGZmMDA0MDc3MWE2N2Nh
|
11
|
-
MzNhYjAyMGJiMGEzMzJiMzJiYjllMWUxM2VjN2U0OTM2MWYxMmI=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
OTYwNGNhYzQ5MjJiOTliMzU3YTMyNTc4YzM5ZjQwYTMxZDljZWUyZGQyNTVh
|
14
|
-
ODU2MGEzOTA1NDBjMTRlYjEyNzAyM2EyYjU1OGUyMmNkMzgwNGVkNDU3YzBk
|
15
|
-
ZmEyMjk4MDA0ODA1M2E4NzcxMWI4ZTQ5ZTgwNWI5YWMyY2M2MDQ=
|
6
|
+
metadata.gz: 8d07bbf44b5f855202cdfb3e52933e3ebe73565c136edc0bc8afba71290f0a1ac50b66ee03ff5d9481352b1765c9a6f4e9e82659321881eb5f7baf44a7c8dc65
|
7
|
+
data.tar.gz: 94d379608f2cc63046098a8f6d7b5934b5069c6e3164d1cbe4a542637197a1a9c4b4c7b8233f1106dc37cd06cc030b5371fc3e019b293fd3ee2ed6bfd00b69be
|
data/CHANGELOG.md
CHANGED
@@ -1,68 +1,98 @@
|
|
1
1
|
#Change Log
|
2
2
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
3
3
|
|
4
|
-
This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachangelog.com/)
|
4
|
+
This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachangelog.com/).
|
5
5
|
|
6
6
|
## [Unreleased]
|
7
|
+
## [0.1.0] 2017-06-2017
|
8
|
+
### Fixed
|
9
|
+
- Check-Windows-disk.rb added CSV formatting for WMIC.
|
10
|
+
|
11
|
+
### Added
|
12
|
+
- Windows CPU Load Check written using only Powershell under bin/powershell. (@ajeba99)
|
13
|
+
- Windows Disk Usage Check written using only Powershell under bin/powershell.
|
14
|
+
- Windows Disk Writeable written using only Powershell under bin/powershell (@shoekstra)
|
15
|
+
- Windows Process Check written using only Powershell under bin/powershell.
|
16
|
+
- Windows RAM Check written using only Powershell under bin/powershell.
|
17
|
+
- Windows Service Check written using only Powershell under bin/powershell.
|
18
|
+
- Windows CPU Load Metric written using only Powershell under bin/powershell.
|
19
|
+
- Windows Disk Usage Metric written using only Powershell under bin/powershell.
|
20
|
+
- Windows RAM Metric written using only Powershell under bin/powershell.
|
21
|
+
- Windows Network Metric written using only Powershell under bin/powershell.
|
22
|
+
- Windows Uptime Metric written using only Powershell under bin/powershell.
|
23
|
+
- Add support for ignoring disk checks by disk label (via a regular expression) (@manul7)
|
24
|
+
- Add check-windows-processor-queue-length (@andyroyle)
|
25
|
+
- Add testing on Ruby 2.3 and 2.4.1 (@eheydrick)
|
26
|
+
|
27
|
+
### Changed
|
28
|
+
- Corrected grammer issues and clarified comments in all existing Ruby-based Windows Check and Metric files.
|
29
|
+
- Moved existing Ruby-based Windows Check and Metric files to bin/ruby.
|
30
|
+
- Changed file naming to the singular instead of the difference in plurality between 'check' and 'metrics'.
|
31
|
+
- Updated README.md.
|
32
|
+
|
33
|
+
### Fixed
|
34
|
+
- Fixed numerous grammar issues in CHANGELOG.md file.
|
35
|
+
|
36
|
+
### Removed
|
37
|
+
- Support for Ruby < 2 (@eheydrick)
|
7
38
|
|
8
39
|
## [0.0.10] - 2016-02-16
|
9
40
|
### Fixed
|
10
|
-
-
|
41
|
+
- Check-Windows-disk.rb removed system volumes from list
|
11
42
|
|
12
43
|
## [0.0.9] - 2016-02-05
|
13
44
|
### Added
|
14
|
-
-
|
45
|
+
- New certs
|
15
46
|
|
16
47
|
## [0.0.8] - 2015-12-10
|
17
48
|
### Fixed
|
18
|
-
-
|
49
|
+
- Metric-Windows-disk-usage.rb incorrect variable
|
19
50
|
|
20
51
|
## [0.0.7] - 2015-11-19
|
21
52
|
### Fixed
|
22
|
-
-
|
53
|
+
- Metric-Windows-network.rb: remove characters that break graphite metrics
|
23
54
|
|
24
55
|
## [0.0.6] - 2015-08-04
|
25
56
|
### Changed
|
26
|
-
-
|
27
|
-
-
|
28
|
-
-
|
57
|
+
- Updated check-Windows-process to use native WMI hooks
|
58
|
+
- Bump rubocop
|
59
|
+
- Change binstubs to only be created for ruby files
|
29
60
|
|
30
61
|
## [0.0.5] - 2015-07-14
|
31
62
|
### Changed
|
32
|
-
-
|
63
|
+
- Updated Sensu-plugin gem to 1.2.0
|
33
64
|
|
34
65
|
## [0.0.4] - 2015-07-05
|
35
66
|
### Added
|
36
|
-
-
|
37
|
-
-
|
38
|
-
-
|
67
|
+
- Windows Uptime Metrics
|
68
|
+
- Windows RAM Metrics
|
69
|
+
- Windows Network Metrics
|
39
70
|
|
40
71
|
### Removed
|
41
|
-
-
|
72
|
+
- Removed IIS check / metrics plugins and moved them to their own sensu iis plugin repository
|
42
73
|
|
43
74
|
## [0.0.3]
|
44
75
|
- Pulled
|
45
76
|
|
46
77
|
## [0.0.2] - 2015-06-03
|
47
|
-
|
48
78
|
### Fixed
|
49
|
-
-
|
79
|
+
- Added binstubs
|
50
80
|
|
51
81
|
### Changed
|
52
|
-
-
|
82
|
+
- Removed cruft from /lib
|
53
83
|
|
54
84
|
## 0.0.1 - 2015-05-21
|
55
|
-
|
56
85
|
### Added
|
57
|
-
-
|
58
|
-
|
59
|
-
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-
|
60
|
-
[0.0
|
61
|
-
[0.0.
|
62
|
-
[0.0.
|
63
|
-
[0.0.
|
64
|
-
[0.0.
|
65
|
-
[0.0.
|
66
|
-
[0.0.
|
67
|
-
[0.0.4]: https://github.com/sensu-plugins/sensu-plugins-
|
68
|
-
[0.0.
|
86
|
+
- Initial release
|
87
|
+
|
88
|
+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-Windows/compare/0.1.0...HEAD
|
89
|
+
[0.1.0]: https://github.com/sensu-plugins/sensu-plugins-Windows/compare/v0.0.10...0.1.0
|
90
|
+
[0.0.10]: https://github.com/sensu-plugins/sensu-plugins-Windows/compare/v0.0.9...v0.0.10
|
91
|
+
[0.0.9]: https://github.com/sensu-plugins/sensu-plugins-Windows/compare/0.0.8..v0.0.9
|
92
|
+
[0.0.8]: https://github.com/sensu-plugins/sensu-plugins-Windows/compare/0.0.7...0.0.8
|
93
|
+
[0.0.7]: https://github.com/sensu-plugins/sensu-plugins-Windows/compare/0.0.6...0.0.7
|
94
|
+
[0.0.6]: https://github.com/sensu-plugins/sensu-plugins-Windows/compare/0.0.5...0.0.6
|
95
|
+
[0.0.5]: https://github.com/sensu-plugins/sensu-plugins-Windows/compare/0.0.4...0.0.5
|
96
|
+
[0.0.4]: https://github.com/sensu-plugins/sensu-plugins-Windows/compare/0.0.3...0.0.4
|
97
|
+
[0.0.4]: https://github.com/sensu-plugins/sensu-plugins-Windows/compare/0.0.2...0.0.3
|
98
|
+
[0.0.2]: https://github.com/sensu-plugins/sensu-plugins-Windows/compare/0.0.1...0.0.2
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
## Sensu-Plugins-
|
1
|
+
## Sensu-Plugins-Windows
|
2
2
|
|
3
3
|
[](https://travis-ci.org/sensu-plugins/sensu-plugins-windows)
|
4
4
|
[](http://badge.fury.io/rb/sensu-plugins-windows)
|
@@ -8,22 +8,61 @@
|
|
8
8
|
|
9
9
|
## Functionality
|
10
10
|
|
11
|
+
These files provide basic Checks and Metrics for a Windows system.
|
12
|
+
|
11
13
|
## Files
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
* bin/metrics-windows-ram-usage.rb
|
16
|
-
* bin/metrics-windows-uptime.rb
|
14
|
+
|
15
|
+
### Ruby
|
16
|
+
|
17
17
|
* bin/check-windows-cpu-load.rb
|
18
18
|
* bin/check-windows-disk.rb
|
19
19
|
* bin/check-windows-process.rb
|
20
|
+
* bin/check-windows-processor-queue-length.rb
|
20
21
|
* bin/check-windows-ram.rb
|
21
22
|
* bin/check-windows-service.rb
|
23
|
+
* bin/metric-windows-cpu-load.rb
|
24
|
+
* bin/metric-windows-disk-usage.rb
|
25
|
+
* bin/metric-windows-network.rb
|
26
|
+
* bin/metric-windows-processor-queue-length.rb
|
27
|
+
* bin/metric-windows-ram-usage.rb
|
28
|
+
* bin/metric-windows-uptime.rb
|
29
|
+
|
30
|
+
### Powershell
|
31
|
+
|
32
|
+
* bin/powershell/check-windows-cpu-load.ps1
|
33
|
+
* bin/powershell/check-windows-disk.ps1
|
34
|
+
* bin/powershell/check-windows-disk-writeable.ps1
|
35
|
+
* bin/powershell/check-windows-process.ps1
|
36
|
+
* bin/powershell/check-windows-processor-queue-length.ps1
|
37
|
+
* bin/powershell/check-windows-ram.ps1
|
38
|
+
* bin/powershell/check-windows-service.ps1
|
39
|
+
* bin/powershell/metric-windows-cpu-load.ps1
|
40
|
+
* bin/powershell/metric-windows-disk-usage.ps1
|
41
|
+
* bin/powershell/metric-windows-network.ps1
|
42
|
+
* bin/powershell/metric-windows-processor-queue-length.ps1
|
43
|
+
* bin/powershell/metric-windows-ram-usage.ps1
|
44
|
+
* bin/powershell/metric-windows-uptime.ps1
|
22
45
|
|
23
46
|
## Usage
|
24
47
|
|
48
|
+
Put either the Ruby or Powershell files on a Sensu Client, typically under `C:\etc\sensu\plugins`.
|
49
|
+
|
50
|
+
You should also include the full escaped path to the ruby interpreter in the check's command configuration, see example below:
|
51
|
+
|
52
|
+
```json
|
53
|
+
{
|
54
|
+
"checks": {
|
55
|
+
"cpu_percent": {
|
56
|
+
"command": "c:\\opt\\sensu\\embedded\\bin\\ruby C:\\opt\\sensu\\etc\\plugins\\metric-windows-cpu-load.rb",
|
57
|
+
"interval": 30,
|
58
|
+
"type": "metric",
|
59
|
+
"handler": "win_metrics",
|
60
|
+
"subscribers": ["win_metrics"]
|
61
|
+
}
|
62
|
+
}
|
63
|
+
}
|
64
|
+
```
|
65
|
+
|
25
66
|
## Installation
|
26
67
|
|
27
68
|
[Installation and Setup](http://sensu-plugins.io/docs/installation_instructions.html)
|
28
|
-
|
29
|
-
## Notes
|
@@ -3,6 +3,8 @@
|
|
3
3
|
# check-windows-cpu-load.rb
|
4
4
|
#
|
5
5
|
# DESCRIPTION:
|
6
|
+
# This plugin collects and outputs the CPU load in a Graphite acceptable format.
|
7
|
+
# It uses Typeperf to get the processor usage.
|
6
8
|
#
|
7
9
|
# OUTPUT:
|
8
10
|
# plain text
|
@@ -20,15 +22,10 @@
|
|
20
22
|
#
|
21
23
|
# LICENSE:
|
22
24
|
# Jean-Francois Theroux <me@failshell.io>
|
23
|
-
# Released under the same terms as Sensu (the MIT license); see LICENSE
|
24
|
-
# for details.
|
25
|
+
# Released under the same terms as Sensu (the MIT license); see LICENSE for details.
|
25
26
|
#
|
26
|
-
|
27
27
|
require 'sensu-plugin/check/cli'
|
28
28
|
|
29
|
-
#
|
30
|
-
# Check Windows CPU Load
|
31
|
-
#
|
32
29
|
class CheckWindowsCpuLoad < Sensu::Plugin::Check::CLI
|
33
30
|
option :warning,
|
34
31
|
short: '-w WARNING',
|
data/bin/check-windows-disk.rb
CHANGED
@@ -5,9 +5,6 @@
|
|
5
5
|
# DESCRIPTION:
|
6
6
|
# This is mostly copied from the original check-disk.rb plugin and modified
|
7
7
|
# to use WMIC. This is our first attempt at writing a plugin for Windows.
|
8
|
-
#
|
9
|
-
# Uses Windows WMIC facility. Warning/critical levels are percentages only.
|
10
|
-
|
11
8
|
#
|
12
9
|
# OUTPUT:
|
13
10
|
# plain text
|
@@ -22,18 +19,14 @@
|
|
22
19
|
# USAGE:
|
23
20
|
#
|
24
21
|
# NOTES:
|
22
|
+
# Uses Windows WMIC facility. Warning/critical levels are percentages only.
|
25
23
|
#
|
26
24
|
# LICENSE:
|
27
|
-
# Copyright 2013 <bp-parks@wiu.edu> <mr-mencel@wiu.edu>
|
28
|
-
# Released under the same terms as Sensu (the MIT license); see LICENSE
|
29
|
-
# for details.
|
25
|
+
# Copyright 2013 <bp-parks@wiu.edu> and <mr-mencel@wiu.edu>
|
26
|
+
# Released under the same terms as Sensu (the MIT license); see LICENSE for details.
|
30
27
|
#
|
31
|
-
|
32
28
|
require 'sensu-plugin/check/cli'
|
33
29
|
|
34
|
-
#
|
35
|
-
# Check Disk
|
36
|
-
#
|
37
30
|
class CheckDisk < Sensu::Plugin::Check::CLI
|
38
31
|
option :fstype,
|
39
32
|
short: '-t TYPE',
|
@@ -47,6 +40,10 @@ class CheckDisk < Sensu::Plugin::Check::CLI
|
|
47
40
|
short: '-i MNT',
|
48
41
|
proc: proc { |a| a.split(',') }
|
49
42
|
|
43
|
+
option :ignorelabel,
|
44
|
+
short: '-I LABEL_REGEXP',
|
45
|
+
proc: proc { |a| Regexp.new(a) }
|
46
|
+
|
50
47
|
option :warn,
|
51
48
|
short: '-w PERCENT',
|
52
49
|
proc: proc(&:to_i),
|
@@ -64,10 +61,10 @@ class CheckDisk < Sensu::Plugin::Check::CLI
|
|
64
61
|
end
|
65
62
|
|
66
63
|
def read_wmic
|
67
|
-
`wmic volume where DriveType=3 list brief`.split("\n").drop(1).each do |line|
|
64
|
+
`wmic volume where DriveType=3 list brief /format:csv`.split("\n").drop(1).each do |line|
|
68
65
|
begin
|
69
66
|
# #YELLOW
|
70
|
-
capacity, type, _fs, _avail, label, mnt = line.split # rubocop:disable Lint/UnderscorePrefixedVariableName
|
67
|
+
_hostname, capacity, type, _fs, _avail, label, mnt = line.split(',') # rubocop:disable Lint/UnderscorePrefixedVariableName
|
71
68
|
next if /\S/ !~ line
|
72
69
|
next if _avail.nil?
|
73
70
|
next if line.include?('System Reserved')
|
@@ -75,6 +72,7 @@ class CheckDisk < Sensu::Plugin::Check::CLI
|
|
75
72
|
next if config[:fstype] && !config[:fstype].include?(type)
|
76
73
|
next if config[:ignoretype] && config[:ignoretype].include?(type)
|
77
74
|
next if config[:ignoremnt] && config[:ignoremnt].include?(mnt)
|
75
|
+
next if config[:ignorelabel] && config[:ignorelabel].match(label)
|
78
76
|
rescue
|
79
77
|
unknown "malformed line from df: #{line}"
|
80
78
|
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
# check-windows-process.rb
|
4
4
|
#
|
5
5
|
# DESCRIPTION:
|
6
|
-
# This plugin checks whether a User-inputted process is running or not
|
6
|
+
# This plugin checks whether a User-inputted process is running or not.
|
7
7
|
# This checks users tasklist tool to find any process is running or not.
|
8
8
|
#
|
9
9
|
# OUTPUT:
|
@@ -16,14 +16,13 @@
|
|
16
16
|
# gem: sensu-plugin
|
17
17
|
#
|
18
18
|
# USAGE:
|
19
|
-
#
|
19
|
+
# check-windows-process -p <process substr to match> [ -w <warn age> ]
|
20
20
|
#
|
21
21
|
# NOTES:
|
22
22
|
#
|
23
23
|
# LICENSE:
|
24
24
|
# Copyright 2015 <onetinov@lxrb.com>
|
25
|
-
# Released under the same terms as Sensu (the MIT license); see LICENSE
|
26
|
-
# for details.
|
25
|
+
# Released under the same terms as Sensu (the MIT license); see LICENSE for details.
|
27
26
|
#
|
28
27
|
require 'optparse'
|
29
28
|
require 'time'
|
@@ -0,0 +1,47 @@
|
|
1
|
+
#! /usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# check-windows-processor-queue-length.rb
|
4
|
+
#
|
5
|
+
# DESCRIPTION:
|
6
|
+
# This plugin checks the Processor Queue Length
|
7
|
+
# It uses Typeperf to get the processor usage.
|
8
|
+
#
|
9
|
+
# OUTPUT:
|
10
|
+
# plain text
|
11
|
+
#
|
12
|
+
# PLATFORMS:
|
13
|
+
# Windows
|
14
|
+
#
|
15
|
+
# DEPENDENCIES:
|
16
|
+
# gem: sensu-plugin
|
17
|
+
#
|
18
|
+
# USAGE:
|
19
|
+
#
|
20
|
+
# NOTES:
|
21
|
+
# Tested on Windows 2012R2.
|
22
|
+
#
|
23
|
+
# LICENSE:
|
24
|
+
# Andy Royle <ajroyle@gmail.com>
|
25
|
+
# Released under the same terms as Sensu (the MIT license); see LICENSE for details.
|
26
|
+
#
|
27
|
+
require 'sensu-plugin/check/cli'
|
28
|
+
|
29
|
+
class CheckWindowsProcessorQueueLength < Sensu::Plugin::Check::CLI
|
30
|
+
option :warning,
|
31
|
+
short: '-w WARNING',
|
32
|
+
default: 5,
|
33
|
+
proc: proc(&:to_i)
|
34
|
+
|
35
|
+
option :critical,
|
36
|
+
short: '-c CRITICAL',
|
37
|
+
default: 10,
|
38
|
+
proc: proc(&:to_i)
|
39
|
+
|
40
|
+
def run
|
41
|
+
io = IO.popen('typeperf -sc 1 "system\\processor queue length"')
|
42
|
+
cpu_queue = io.readlines[2].split(',')[1].delete('"').to_i
|
43
|
+
critical "Processor Queue at at #{cpu_queue}%" if cpu_queue > config[:critical]
|
44
|
+
warning "Processor Queue at #{cpu_queue}%" if cpu_queue > config[:warning]
|
45
|
+
ok "Processor Queue at #{cpu_queue}%"
|
46
|
+
end
|
47
|
+
end
|
data/bin/check-windows-ram.rb
CHANGED
@@ -3,6 +3,8 @@
|
|
3
3
|
# check-windows-ram.rb
|
4
4
|
#
|
5
5
|
# DESCRIPTION:
|
6
|
+
# This plugin collects and outputs the RAM usage in a Graphite acceptable format.
|
7
|
+
# It uses Typeperf to get available memory and WMIC to get the usable memory size.
|
6
8
|
#
|
7
9
|
# OUTPUT:
|
8
10
|
# plain text
|
@@ -16,19 +18,14 @@
|
|
16
18
|
# USAGE:
|
17
19
|
#
|
18
20
|
# NOTES:
|
19
|
-
#
|
21
|
+
# Tested on Windows 2008RC2.
|
20
22
|
#
|
21
23
|
# LICENSE:
|
22
24
|
# Jean-Francois Theroux <me@failshell.io>
|
23
|
-
# Released under the same terms as Sensu (the MIT license); see LICENSE
|
24
|
-
# for details.
|
25
|
+
# Released under the same terms as Sensu (the MIT license); see LICENSE for details.
|
25
26
|
#
|
26
|
-
|
27
27
|
require 'sensu-plugin/check/cli'
|
28
28
|
|
29
|
-
#
|
30
|
-
# Check Windows RAM Load
|
31
|
-
#
|
32
29
|
class CheckWindowsRAMLoad < Sensu::Plugin::Check::CLI
|
33
30
|
option :warning,
|
34
31
|
short: '-w WARNING',
|
@@ -1,15 +1,13 @@
|
|
1
1
|
#! /usr/bin/env ruby
|
2
2
|
#
|
3
|
-
# check-service
|
3
|
+
# check-windows-service.rb
|
4
4
|
#
|
5
5
|
# DESCRIPTION:
|
6
|
-
#
|
7
|
-
# This plugin checks whether a User-inputted service on Windows is running or not
|
6
|
+
# This plugin checks whether a User-supplied service on Windows is running or not
|
8
7
|
# This checks users tasklist tool to find any service on Windows is running or not.
|
9
|
-
|
10
8
|
#
|
11
9
|
# OUTPUT:
|
12
|
-
# plain text
|
10
|
+
# plain text
|
13
11
|
#
|
14
12
|
# PLATFORMS:
|
15
13
|
# Windows
|
@@ -22,17 +20,12 @@
|
|
22
20
|
# NOTES:
|
23
21
|
#
|
24
22
|
# LICENSE:
|
25
|
-
# Edited from
|
23
|
+
# Edited from <jashishtech@gmail.com>
|
26
24
|
# Copyright 2014 <jj.asghar@peopleadmin.com>
|
27
|
-
# Released under the same terms as Sensu (the MIT license); see LICENSE
|
28
|
-
# for details.
|
25
|
+
# Released under the same terms as Sensu (the MIT license); see LICENSE for details.
|
29
26
|
#
|
30
|
-
|
31
27
|
require 'sensu-plugin/check/cli'
|
32
28
|
|
33
|
-
#
|
34
|
-
# Check Win Services
|
35
|
-
#
|
36
29
|
class CheckWinService < Sensu::Plugin::Check::CLI
|
37
30
|
option :service,
|
38
31
|
description: 'Check for a specific service',
|