sensu-plugins-windows 2.4.1 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -1
- data/README.md +38 -1
- data/bin/check-windows-cpu-load.rb +0 -0
- data/bin/check-windows-process.rb +0 -0
- data/bin/check-windows-processor-queue-length.rb +0 -0
- data/bin/check-windows-ram.rb +0 -0
- data/bin/metric-windows-cpu-load.rb +0 -0
- data/bin/metric-windows-disk-usage.rb +0 -0
- data/bin/metric-windows-network.rb +0 -0
- data/bin/metric-windows-processor-queue-length.rb +0 -0
- data/bin/metric-windows-ram-usage.rb +0 -0
- data/bin/metric-windows-uptime.rb +0 -0
- data/bin/powershell_helper.rb +36 -0
- data/lib/sensu-plugins-windows/version.rb +2 -2
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34416dd0408bd2121719a7a26c27bc8496110e594dd704a5d93c3853ea8e9cf9
|
4
|
+
data.tar.gz: bde0a9969c9afebdd70d7e07026423124459d532e8814b7ba0af7389c345a5f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a5ff8d9c2e6f65c37fa59b880e9d0b7c33af74fe125014b163672a3dad1b30a4f59a7fde693589c6dca7aa4ef32a3618f413d2a40570989e12d5e757c6e1d19
|
7
|
+
data.tar.gz: 4e43cce4a22742f5c39787450f4cf70a0f1bb8644dc012ac44d803511eb2a74e8bb0f055be52e67ff42682453db2677639822132e2ed00c70f6f3f8932141c70
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,13 @@ Which is based on [Keep A Changelog](http://keepachangelog.com/)
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
+
## [2.5.0] - 2018-05-02
|
10
|
+
### Added
|
11
|
+
- powershell_helper.rb, added helper to wrap around Powershell directory (@makaveli0129).
|
12
|
+
|
13
|
+
### Changed
|
14
|
+
- README.md, changed to include calls for powershell_helper.rb (@makaveli0129).
|
15
|
+
|
9
16
|
### [2.4.1] - 2018-04-18
|
10
17
|
### Fixed
|
11
18
|
- check-windows-http.ps1: fixed typo (@stevebanik-ndsc)
|
@@ -143,7 +150,8 @@ Which is based on [Keep A Changelog](http://keepachangelog.com/)
|
|
143
150
|
### Added
|
144
151
|
- Initial release
|
145
152
|
|
146
|
-
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-Windows/compare/2.
|
153
|
+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-Windows/compare/2.5.0...HEAD
|
154
|
+
[2.5.0]: https://github.com/sensu-plugins/sensu-plugins-Windows/compare/2.4.1...2.5.0
|
147
155
|
[2.4.1]: https://github.com/sensu-plugins/sensu-plugins-Windows/compare/2.4.0...2.4.1
|
148
156
|
[2.4.0]: https://github.com/sensu-plugins/sensu-plugins-Windows/compare/2.3.0...2.4.0
|
149
157
|
[2.3.0]: https://github.com/sensu-plugins/sensu-plugins-Windows/compare/2.2.1...2.3.0
|
data/README.md
CHANGED
@@ -28,6 +28,7 @@ These files provide basic Checks and Metrics for a Windows system.
|
|
28
28
|
* bin/metric-windows-processor-queue-length.rb
|
29
29
|
* bin/metric-windows-ram-usage.rb
|
30
30
|
* bin/metric-windows-uptime.rb
|
31
|
+
* bin/powershell_helper.rb
|
31
32
|
|
32
33
|
### Powershell
|
33
34
|
|
@@ -48,7 +49,43 @@ These files provide basic Checks and Metrics for a Windows system.
|
|
48
49
|
|
49
50
|
## Usage
|
50
51
|
|
51
|
-
|
52
|
+
##### Example 1:
|
53
|
+
|
54
|
+
Execute Powershell functions using the helper (No copy needed), see example below:
|
55
|
+
|
56
|
+
```json
|
57
|
+
{
|
58
|
+
"checks": {
|
59
|
+
"cpu_percent": {
|
60
|
+
"command": "c:\\opt\\sensu\\embedded\\bin\\ruby C:\\opt\\sensu\\embedded\\bin\\powershell_helper.rb check-windows-ram.ps1 90 95",
|
61
|
+
"interval": 30,
|
62
|
+
"type": "check",
|
63
|
+
"handler": "win_metrics",
|
64
|
+
"subscribers": ["win_metrics"]
|
65
|
+
}
|
66
|
+
}
|
67
|
+
}
|
68
|
+
```
|
69
|
+
|
70
|
+
##### Example 2:
|
71
|
+
|
72
|
+
- Copy either the Ruby or Powershell files on a Sensu Client, typically under C:\etc\sensu\plugins.
|
73
|
+
|
74
|
+
- You should also include the full escaped path to the ruby interpreter in the check's command configuration, see example below:
|
75
|
+
|
76
|
+
```json
|
77
|
+
{
|
78
|
+
"checks": {
|
79
|
+
"cpu_percent": {
|
80
|
+
"command": "c:\\opt\\sensu\\embedded\\bin\\ruby C:\\opt\\sensu\\etc\\plugins\\metric-windows-cpu-load.rb",
|
81
|
+
"interval": 30,
|
82
|
+
"type": "metric",
|
83
|
+
"handler": "win_metrics",
|
84
|
+
"subscribers": ["win_metrics"]
|
85
|
+
}
|
86
|
+
}
|
87
|
+
}
|
88
|
+
```
|
52
89
|
|
53
90
|
You should also include the full escaped path to the ruby interpreter in the check's command configuration, see example below:
|
54
91
|
|
File without changes
|
File without changes
|
File without changes
|
data/bin/check-windows-ram.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,36 @@
|
|
1
|
+
#! /usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# powershell_helper.rb
|
4
|
+
#
|
5
|
+
# DESCRIPTION:
|
6
|
+
# This is meant to execute powershell in the bin/powershell deirectory
|
7
|
+
# so we don't have to copy the code out of the GEM. This is meant only as a
|
8
|
+
# wrapper.
|
9
|
+
#
|
10
|
+
# OUTPUT:
|
11
|
+
# N/A
|
12
|
+
#
|
13
|
+
# PLATFORMS:
|
14
|
+
# Windows
|
15
|
+
#
|
16
|
+
# DEPENDENCIES:
|
17
|
+
# None
|
18
|
+
#
|
19
|
+
# USAGE:
|
20
|
+
# C:\opt\sensu\embedded\bin\ruby C:\opt\sensu\embedded\bin\powershell_helper <poweshell-script> ARGS
|
21
|
+
#
|
22
|
+
# NOTES:
|
23
|
+
#
|
24
|
+
# LICENSE:
|
25
|
+
# Copyright 2018 <dasecretzofwar@gmail.com>
|
26
|
+
# Released under the same terms as Sensu (the MIT license); see LICENSE for details.
|
27
|
+
#
|
28
|
+
|
29
|
+
if ARGV.empty?
|
30
|
+
puts 'You must specify arguments for powershell file'
|
31
|
+
exit 2
|
32
|
+
end
|
33
|
+
|
34
|
+
powershell_dir = File.expand_path('./powershell', File.dirname(__FILE__))
|
35
|
+
command = "Powershell.exe -NonInteractive -NoProfile -ExecutionPolicy Bypass -NoLogo -File #{File.expand_path(ARGV.join(' '), powershell_dir)}"
|
36
|
+
exec command
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-plugins-windows
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sensu-Plugins and contributors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sensu-plugin
|
@@ -153,18 +153,19 @@ dependencies:
|
|
153
153
|
description: Sensu plugins for Windows
|
154
154
|
email: "<sensu-users@googlegroups.com>"
|
155
155
|
executables:
|
156
|
-
- check-windows-disk.rb
|
157
|
-
- check-windows-service.rb
|
158
156
|
- check-windows-cpu-load.rb
|
157
|
+
- check-windows-disk.rb
|
159
158
|
- check-windows-process.rb
|
160
159
|
- check-windows-processor-queue-length.rb
|
161
160
|
- check-windows-ram.rb
|
161
|
+
- check-windows-service.rb
|
162
162
|
- metric-windows-cpu-load.rb
|
163
163
|
- metric-windows-disk-usage.rb
|
164
164
|
- metric-windows-network.rb
|
165
165
|
- metric-windows-processor-queue-length.rb
|
166
166
|
- metric-windows-ram-usage.rb
|
167
167
|
- metric-windows-uptime.rb
|
168
|
+
- powershell_helper.rb
|
168
169
|
extensions: []
|
169
170
|
extra_rdoc_files: []
|
170
171
|
files:
|
@@ -208,6 +209,7 @@ files:
|
|
208
209
|
- bin/powershell/metric-windows-system.ps1
|
209
210
|
- bin/powershell/metric-windows-uptime.ps1
|
210
211
|
- bin/powershell/perfhelper.ps1
|
212
|
+
- bin/powershell_helper.rb
|
211
213
|
- lib/sensu-plugins-windows.rb
|
212
214
|
- lib/sensu-plugins-windows/version.rb
|
213
215
|
homepage: https://github.com/sensu-plugins/sensu-plugins-windows
|