sensu-plugins-windows 2.6.0 → 2.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b7b98e57c48291e2dae995cccdb92c0754b4a33ba3cff2f72b80812c50c26684
4
- data.tar.gz: 1b65662d798a563a9e615acbf6f379c78b3bb2e1e02afed8528ccf239e660e55
3
+ metadata.gz: e217e7e11a7814a8ec55b556f00af0199f1c846cc36ea1cfea79df35e8dd0480
4
+ data.tar.gz: 6d671ccec3a4075dfc3d005a22db54bf1a817d9a19c57ad199ac6f000a229012
5
5
  SHA512:
6
- metadata.gz: 52373fe594cae7d0a84c0e2c014bb242d780c22b8df7bbac828d8599afd32890054037f42c73d1018d433257b8bed5145ce0f0b2f598c564b2bcad5b6113308f
7
- data.tar.gz: 242135a9e0eb5153632fbb1712d125c670ee474b9affcd1ae51a992e632a76ea1322b983c02766f42ec646c20259f6850be232520d4841c51006bfd0ea573160
6
+ metadata.gz: 8296ad496e9c849a12896992e7fd4fbe2d9c6238c5ad37f7ad611faaa9ed835ca65b8c24169264bdcffed76557d2f47a336ab069595de7f0651863a38c657d64
7
+ data.tar.gz: 011523e6be8f7f15735b8de00d7981f7bd5bccf4f63791974b9ae05956cb1c3c5572ebe6a8c99056a5271bf84492f0e118914a485579dc60b492bed7233045f8
@@ -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-event-log.ps1, added plugin to check for pattern and returns the number criticals and warnings that match that pattern (@patricewhite).
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.6.0...HEAD
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
+ }
@@ -1,7 +1,7 @@
1
1
  module SensuPluginsWindows
2
2
  module Version
3
3
  MAJOR = 2
4
- MINOR = 6
4
+ MINOR = 7
5
5
  PATCH = 0
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
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.6.0
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