sensu-plugins-windows 2.6.0 → 2.7.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 +4 -4
- data/CHANGELOG.md +7 -2
- data/README.md +2 -0
- data/bin/powershell/check-windows-log.ps1 +40 -0
- data/lib/sensu-plugins-windows/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e217e7e11a7814a8ec55b556f00af0199f1c846cc36ea1cfea79df35e8dd0480
|
4
|
+
data.tar.gz: 6d671ccec3a4075dfc3d005a22db54bf1a817d9a19c57ad199ac6f000a229012
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8296ad496e9c849a12896992e7fd4fbe2d9c6238c5ad37f7ad611faaa9ed835ca65b8c24169264bdcffed76557d2f47a336ab069595de7f0651863a38c657d64
|
7
|
+
data.tar.gz: 011523e6be8f7f15735b8de00d7981f7bd5bccf4f63791974b9ae05956cb1c3c5572ebe6a8c99056a5271bf84492f0e118914a485579dc60b492bed7233045f8
|
data/CHANGELOG.md
CHANGED
@@ -6,9 +6,13 @@ Which is based on [Keep A Changelog](http://keepachangelog.com/)
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
+
## [2.7.0] - 2018-05-09
|
10
|
+
### Changed
|
11
|
+
- check-windows-event-log.ps1, added plugin to check for pattern and returns the number criticals and warnings that match that pattern (@patricewhite)
|
12
|
+
|
9
13
|
## [2.6.0] - 2018-05-09
|
10
14
|
### Added
|
11
|
-
- check-windows-
|
15
|
+
- check-windows-log.ps1, added plugin to check for pattern in log file (@patricewhite).
|
12
16
|
|
13
17
|
### Changed
|
14
18
|
- README.md, changed to include new plugin (@patricewhite).
|
@@ -157,7 +161,8 @@ Which is based on [Keep A Changelog](http://keepachangelog.com/)
|
|
157
161
|
### Added
|
158
162
|
- Initial release
|
159
163
|
|
160
|
-
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-Windows/compare/2.
|
164
|
+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-Windows/compare/2.7.0...HEAD
|
165
|
+
[2.7.0]: https://github.com/sensu-plugins/sensu-plugins-Windows/compare/2.6.0...2.7.0
|
161
166
|
[2.6.0]: https://github.com/sensu-plugins/sensu-plugins-Windows/compare/2.5.0...2.6.0
|
162
167
|
[2.5.0]: https://github.com/sensu-plugins/sensu-plugins-Windows/compare/2.4.1...2.5.0
|
163
168
|
[2.4.1]: https://github.com/sensu-plugins/sensu-plugins-Windows/compare/2.4.0...2.4.1
|
data/README.md
CHANGED
@@ -47,6 +47,8 @@ These files provide basic Checks and Metrics for a Windows system.
|
|
47
47
|
* bin/powershell/metric-windows-ram-usage.ps1
|
48
48
|
* bin/powershell/metric-windows-uptime.ps1
|
49
49
|
* bin/powershell/check-windows-event-log.ps1
|
50
|
+
* bin/powershell/check-windows-log.ps1
|
51
|
+
|
50
52
|
|
51
53
|
## Usage
|
52
54
|
|
@@ -0,0 +1,40 @@
|
|
1
|
+
<#
|
2
|
+
.SYNOPSIS
|
3
|
+
Returns all occurances of pattern in log file
|
4
|
+
.DESCRIPTION
|
5
|
+
Checks log file for pattern and returns line(s) containing pattern
|
6
|
+
.Notes
|
7
|
+
FileName : check-windows-log.ps1
|
8
|
+
Author : Patrice White - patrice.white@ge.com
|
9
|
+
.LINK
|
10
|
+
https://github.com/sensu-plugins/sensu-plugins-windows
|
11
|
+
.PARAMETER LogName
|
12
|
+
Required. The name of the log file.
|
13
|
+
Example -LogName example.log
|
14
|
+
.PARAMETER Pattern
|
15
|
+
Required. The pattern you want to search for.
|
16
|
+
Example -LogName example.log -Pattern error
|
17
|
+
.EXAMPLE
|
18
|
+
powershell.exe -file check-windows-log.ps1 -LogPath example.log -Pattern error
|
19
|
+
#>
|
20
|
+
|
21
|
+
[CmdletBinding()]
|
22
|
+
Param(
|
23
|
+
[Parameter(Mandatory=$True)]
|
24
|
+
[string]$LogPath,
|
25
|
+
[Parameter(Mandatory=$True)]
|
26
|
+
[string]$Pattern
|
27
|
+
)
|
28
|
+
|
29
|
+
#Search for pattern inside of File
|
30
|
+
$ThisLog = Select-String -Path $LogPath -Pattern $Pattern -AllMatch
|
31
|
+
|
32
|
+
#Show matched lines if they exist
|
33
|
+
If($ThisLog -eq $null ){
|
34
|
+
"CheckLog OK: The pattern doesn't exist in log"
|
35
|
+
EXIT 0
|
36
|
+
}else{
|
37
|
+
$ThisLog
|
38
|
+
"CheckLog CRITICAL"
|
39
|
+
EXIT 2
|
40
|
+
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sensu-Plugins and contributors
|
@@ -196,6 +196,7 @@ files:
|
|
196
196
|
- bin/powershell/check-windows-disk.ps1
|
197
197
|
- bin/powershell/check-windows-event-log.ps1
|
198
198
|
- bin/powershell/check-windows-http.ps1
|
199
|
+
- bin/powershell/check-windows-log.ps1
|
199
200
|
- bin/powershell/check-windows-pagefile.ps1
|
200
201
|
- bin/powershell/check-windows-process.ps1
|
201
202
|
- bin/powershell/check-windows-processor-queue-length.ps1
|