sensu-plugins-logs 1.3.0 → 1.3.1

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
  SHA1:
3
- metadata.gz: 3a4097a3245236c405f8d92998311318a1f53d01
4
- data.tar.gz: 9ccccf0bc32d1075f035f452d0902caaf58c1b58
3
+ metadata.gz: 4b94ea6039ed40f70020b9baba6b4e091bedae8a
4
+ data.tar.gz: 502006d3b07d51c8b8330596eecfcf5f4421986c
5
5
  SHA512:
6
- metadata.gz: f755f924a2671f195a5d1f5a1f2122493aee45d2ef83a4ab15dbf1b8e6c571dc8bce31127347fda0830c17cb7a10a9fe1938440c1c6b1a5ab0f7d32b06bc811c
7
- data.tar.gz: 72df7a59a23125014c7fa988818e62c7024b0345aa6178fb6226512bd500b6b5f05ce0e2397e995a5eb04a19f21604eb1983f2401bcf74ffb765f056f6a68d1a
6
+ metadata.gz: c4e7546280ee862b07f3a664019c07fb7eb0b72be0a4f6f1e00cbe40b5985786ed0e0f7048a4ce8b319a4d548fa60696ab89408b4c8057d9d1efe7ea0f2c33b5
7
+ data.tar.gz: f4a40bf6b5d3e32811d7faf3308e8cd7e2d6c4c11c665ef8a071ea4727fae20bc39bf0a7992c1d4e4b19bacdab334fb7e3d118c49acaab73f3f99160a18538d8
@@ -5,6 +5,10 @@ This CHANGELOG follows the format listed [here](https://github.com/sensu-plugins
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [1.3.1] - 2017-10-09
9
+ ### Fixed
10
+ - check-log.rb: added `File::TRUNC` option to the state file to address scenerios where files were written to often and rotated which caused the offset to be wrong. This caused high diskio as it was trying to seek to a part of a non existent file or past the correct location in the file. (@georgespatton)
11
+
8
12
  ## [1.3.0] - 2017-09-23
9
13
  ### Added
10
14
  - check-log.rb: `return-error-limit` option to limit the number of returned matched lines (log entries) (@jhshadi)
@@ -68,7 +72,8 @@ This CHANGELOG follows the format listed [here](https://github.com/sensu-plugins
68
72
  ### Added
69
73
  - initial release
70
74
 
71
- [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-logs/compare/1.3.0...HEAD
75
+ [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-logs/compare/1.3.1...HEAD
76
+ [1.3.1]: https://github.com/sensu-plugins/sensu-plugins-logs/compare/1.3.0...1.3.1
72
77
  [1.3.0]: https://github.com/sensu-plugins/sensu-plugins-logs/compare/1.2.1...1.3.0
73
78
  [1.2.1]: https://github.com/sensu-plugins/sensu-plugins-logs/compare/1.2.0...1.2.1
74
79
  [1.2.0]: https://github.com/sensu-plugins/sensu-plugins-logs/compare/1.2.2...1.2.0
@@ -243,7 +243,7 @@ class CheckLog < Sensu::Plugin::Check::CLI
243
243
  n_warns = n_matched
244
244
  end
245
245
  FileUtils.mkdir_p(File.dirname(@state_file))
246
- File.open(@state_file, File::RDWR | File::CREAT, 0644) do |file|
246
+ File.open(@state_file, File::RDWR | File::TRUNC | File::CREAT, 0644) do |file|
247
247
  file.flock(File::LOCK_EX) unless Gem.win_platform?
248
248
  file.write(@bytes_to_skip + bytes_read)
249
249
  end
@@ -2,7 +2,7 @@ module SensuPluginsLogs
2
2
  module Version
3
3
  MAJOR = 1
4
4
  MINOR = 3
5
- PATCH = 0
5
+ PATCH = 1
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-logs
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
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: 2017-09-23 00:00:00.000000000 Z
11
+ date: 2017-10-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sensu-plugin
@@ -198,7 +198,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
198
198
  version: '0'
199
199
  requirements: []
200
200
  rubyforge_project:
201
- rubygems_version: 2.6.13
201
+ rubygems_version: 2.6.14
202
202
  signing_key:
203
203
  specification_version: 4
204
204
  summary: Sensu plugins for logs