sensu-plugins-logs 0.0.4 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- YzI1NWFmMjZhMGNhMWQyZWUyNDZlNDM1MWZlMDY0YjZiNDlhMjYyZg==
5
- data.tar.gz: !binary |-
6
- Zjg3ZDMwNTRkZGEyMDQ4MDZlYjAwN2YzMmE5NTJiM2ZjZDBlMGNlNA==
2
+ SHA1:
3
+ metadata.gz: 4ca00d7419177ed84a34e3bd7b9d302e108bb126
4
+ data.tar.gz: 920733496f7eed50cba97b593df62f39c4eaf0da
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- ZGYxODY3MTAzNjNmNDBjMTlhYTJkZWM2MWU0NTQxZjc4ZjcyMDMyNTljZjgw
10
- NjQ4MDk1NDNmOTk2ZGQ2YTU1Njc5ZTNhMTFkY2Y0NDkwNzk4OTU3Y2RmMzNi
11
- N2IyM2U1ZTk0MmJiMjRhNGYzYTkzMjQ3OWY2NDA4YjRkMjRhOTM=
12
- data.tar.gz: !binary |-
13
- YTE3NjlhYmFlZjI0ZTczZjg1ZDllMzgxYTAyMWI1Yjk5YjAwZmE3MzM3NjUz
14
- OTg2OTgyYzRlZjYxMWUxMTJiOWEwYTU1YmI4YjdmNWZlZWMyMDA4YTdiN2Q1
15
- N2MzYjdiNmE2MmY4YTg1OTUxYWIwMGZiYTU3MGViYmUxMzljOTA=
6
+ metadata.gz: 377795148728c7bd23665e28a0f0b090f3b1ae0d6dba29c73421762dcf539f5dba34d53d60872c2f029c7d5fcc3c3e2a225c893800a03f7d5fa4b953c192254f
7
+ data.tar.gz: a493f106877b0a25dcc0e9b0e4c430a1f528174667b1071a10c5c7d452297ac14a9c3b41b6660709ec805f022279950ec5a03c0277f7735f032c4a65c4fffe8d
@@ -5,6 +5,20 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [1.0.0] - 2017-03-07
9
+ ### Fixed
10
+ - `check-log.rb`: Drop non-ASCII chars from log line (@vlinevich)
11
+ - `check-log.rb`: Fix return content to have matched line (@saka-shin)
12
+
13
+ ### Changed
14
+ - Upgrade to Rubocop 0.40 and cleanup (@eheydrick)
15
+
16
+ ### Added
17
+ - Ruby 2.3 support
18
+
19
+ ### Removed
20
+ - Ruby 2.0 and older support (@eheydrick)
21
+
8
22
  ## [0.0.4] - 2016-03-12
9
23
  ### Removed
10
24
  - Remove dependency on the fileutils gem
@@ -22,6 +36,7 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
22
36
  ### Added
23
37
  - initial release
24
38
 
25
- [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-logs/compare/0.0.4...HEAD
26
- [0.0.4]: https://github.com/sensu-plugins/sensu-plugins-logs/compare/0.0.4...0.0.4
27
- [0.0.3]: https://github.com/sensu-plugins/sensu-plugins-logs/compare/0.0.1...0.0.3
39
+ [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-logs/compare/1.0.0...HEAD
40
+ [1.0.0]: https://github.com/sensu-plugins/sensu-plugins-logs/compare/0.0.4...1.0.0
41
+ [0.0.4]: https://github.com/sensu-plugins/sensu-plugins-logs/compare/0.0.3...0.0.4
42
+ [0.0.3]: https://github.com/sensu-plugins/sensu-plugins-logs/compare/0.0.2...0.0.3
@@ -136,7 +136,7 @@ class CheckLog < Sensu::Plugin::Check::CLI
136
136
  n_crits_overall += n_crits
137
137
 
138
138
  if config[:return_content]
139
- error_overall = accumulative_error
139
+ error_overall += accumulative_error
140
140
  end
141
141
  end
142
142
  message "#{n_warns_overall} warnings, #{n_crits_overall} criticals for pattern #{config[:pattern]}. #{error_overall}"
@@ -180,6 +180,7 @@ class CheckLog < Sensu::Plugin::Check::CLI
180
180
  @log.seek(@bytes_to_skip, File::SEEK_SET) if @bytes_to_skip > 0
181
181
  # #YELLOW
182
182
  @log.each_line do |line|
183
+ line = line.encode('UTF-8', invalid: :replace, replace: '')
183
184
  bytes_read += line.bytesize
184
185
  if config[:case_insensitive]
185
186
  m = line.downcase.match(config[:pattern].downcase) unless line.match(config[:exclude])
@@ -1,8 +1,8 @@
1
1
  module SensuPluginsLogs
2
2
  module Version
3
- MAJOR = 0
3
+ MAJOR = 1
4
4
  MINOR = 0
5
- PATCH = 4
5
+ PATCH = 0
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,159 +1,160 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-logs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 1.0.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: 2016-03-12 00:00:00.000000000 Z
11
+ date: 2017-03-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sensu-plugin
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.7'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.7'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: codeclimate-test-reporter
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0.4'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0.4'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: github-markup
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: '1.3'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.3'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: pry
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0.10'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0.10'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rubocop
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ~>
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '0.37'
89
+ version: 0.40.0
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ~>
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '0.37'
96
+ version: 0.40.0
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rspec
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ~>
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
103
  version: '3.1'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ~>
108
+ - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: '3.1'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rake
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ~>
115
+ - - "~>"
116
116
  - !ruby/object:Gem::Version
117
117
  version: '10.0'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ~>
122
+ - - "~>"
123
123
  - !ruby/object:Gem::Version
124
124
  version: '10.0'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: redcarpet
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - ~>
129
+ - - "~>"
130
130
  - !ruby/object:Gem::Version
131
131
  version: '3.2'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - ~>
136
+ - - "~>"
137
137
  - !ruby/object:Gem::Version
138
138
  version: '3.2'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: yard
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - ~>
143
+ - - "~>"
144
144
  - !ruby/object:Gem::Version
145
145
  version: '0.8'
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - ~>
150
+ - - "~>"
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0.8'
153
- description: ! "This plugin provides native log instrumentation\n for
154
- monitoring, including: journald history, and\n regex
155
- matching. Includes various log handlers."
156
- email: <sensu-users@googlegroups.com>
153
+ description: |-
154
+ This plugin provides native log instrumentation
155
+ for monitoring, including: journald history, and
156
+ regex matching. Includes various log handlers.
157
+ email: "<sensu-users@googlegroups.com>"
157
158
  executables:
158
159
  - check-journal.rb
159
160
  - check-log.rb
@@ -187,12 +188,12 @@ require_paths:
187
188
  - lib
188
189
  required_ruby_version: !ruby/object:Gem::Requirement
189
190
  requirements:
190
- - - ! '>='
191
+ - - ">="
191
192
  - !ruby/object:Gem::Version
192
- version: 1.9.3
193
+ version: '2.1'
193
194
  required_rubygems_version: !ruby/object:Gem::Requirement
194
195
  requirements:
195
- - - ! '>='
196
+ - - ">="
196
197
  - !ruby/object:Gem::Version
197
198
  version: '0'
198
199
  requirements: []