sensu-plugins-logs 0.0.3 → 0.0.4

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 CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 0834fd1e60534a1b4b603bf9e375a80eb27fa430
4
- data.tar.gz: 5374abbd9f62ad74c3921e53b1c7e1402e8c899b
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ YzI1NWFmMjZhMGNhMWQyZWUyNDZlNDM1MWZlMDY0YjZiNDlhMjYyZg==
5
+ data.tar.gz: !binary |-
6
+ Zjg3ZDMwNTRkZGEyMDQ4MDZlYjAwN2YzMmE5NTJiM2ZjZDBlMGNlNA==
5
7
  SHA512:
6
- metadata.gz: d28a490d7c9cf33630aadfa9ac262183dcf3496929f52e3b752a99eea5f26606c37cb266db7cbd78324261eccaa14622467d79b7147ef1a8bf1db479d69c20b1
7
- data.tar.gz: 2a22356b49aaa2f615e3ddfda2c13d7836be388eda80503829ca0e619afb582f8eeafacd80c353e5644e33bc15717b79e056d8b112f9790c79f95d98ce2c344e
8
+ metadata.gz: !binary |-
9
+ ZGYxODY3MTAzNjNmNDBjMTlhYTJkZWM2MWU0NTQxZjc4ZjcyMDMyNTljZjgw
10
+ NjQ4MDk1NDNmOTk2ZGQ2YTU1Njc5ZTNhMTFkY2Y0NDkwNzk4OTU3Y2RmMzNi
11
+ N2IyM2U1ZTk0MmJiMjRhNGYzYTkzMjQ3OWY2NDA4YjRkMjRhOTM=
12
+ data.tar.gz: !binary |-
13
+ YTE3NjlhYmFlZjI0ZTczZjg1ZDllMzgxYTAyMWI1Yjk5YjAwZmE3MzM3NjUz
14
+ OTg2OTgyYzRlZjYxMWUxMTJiOWEwYTU1YmI4YjdmNWZlZWMyMDA4YTdiN2Q1
15
+ N2MzYjdiNmE2MmY4YTg1OTUxYWIwMGZiYTU3MGViYmUxMzljOTA=
@@ -3,8 +3,11 @@ This project adheres to [Semantic Versioning](http://semver.org/).
3
3
 
4
4
  This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachangelog.com/)
5
5
 
6
- ## Unreleased
7
- - nothing
6
+ ## [Unreleased]
7
+
8
+ ## [0.0.4] - 2016-03-12
9
+ ### Removed
10
+ - Remove dependency on the fileutils gem
8
11
 
9
12
  ## [0.0.3] - 2015-10-22
10
13
  ### Changed
@@ -18,3 +21,7 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
18
21
 
19
22
  ### Added
20
23
  - initial release
24
+
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
data/README.md CHANGED
@@ -5,7 +5,6 @@
5
5
  [![Code Climate](https://codeclimate.com/github/sensu-plugins/sensu-plugins-logs/badges/gpa.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-logs)
6
6
  [![Test Coverage](https://codeclimate.com/github/sensu-plugins/sensu-plugins-logs/badges/coverage.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-logs)
7
7
  [![Dependency Status](https://gemnasium.com/sensu-plugins/sensu-plugins-logs.svg)](https://gemnasium.com/sensu-plugins/sensu-plugins-logs)
8
- [ ![Codeship Status for sensu-plugins/sensu-plugins-logs](https://codeship.com/projects/85800600-e95b-0132-81a4-7e47788fdd48/status?branch=master)](https://codeship.com/projects/82942)
9
8
 
10
9
  ## Functionality
11
10
 
@@ -17,7 +17,6 @@
17
17
  #
18
18
  # DEPENDENCIES:
19
19
  # gem: sensu-plugin
20
- # gem: fileutils
21
20
  #
22
21
  # USAGE:
23
22
  # #YELLOW
@@ -34,7 +33,7 @@ require 'sensu-plugin/check/cli'
34
33
  require 'fileutils'
35
34
 
36
35
  class CheckLog < Sensu::Plugin::Check::CLI
37
- BASE_DIR = '/var/cache/check-log'
36
+ BASE_DIR = '/var/cache/check-log'.freeze
38
37
 
39
38
  option :state_auto,
40
39
  description: 'Set state file dir automatically using name',
@@ -119,7 +118,7 @@ class CheckLog < Sensu::Plugin::Check::CLI
119
118
  if config[:case_insensitive]
120
119
  file_list << "#{dir_str}/#{file}" if file.to_s.downcase.match(file_pat.downcase)
121
120
  else
122
- file_list << "#{dir_str}/#{file}" if file.to_s.match(file_pat)
121
+ file_list << "#{dir_str}/#{file}" if file.to_s.match(file_pat) # rubocop:disable Style/IfInsideElse
123
122
  end
124
123
  end
125
124
  end
@@ -154,11 +153,11 @@ class CheckLog < Sensu::Plugin::Check::CLI
154
153
  state_dir = config[:state_auto] || config[:state_dir]
155
154
 
156
155
  # Opens file using optional encoding page. ex: 'iso8859-1'
157
- if config[:encoding]
158
- @log = File.open(log_file, "r:#{config[:encoding]}")
159
- else
160
- @log = File.open(log_file)
161
- end
156
+ @log = if config[:encoding]
157
+ File.open(log_file, "r:#{config[:encoding]}")
158
+ else
159
+ File.open(log_file)
160
+ end
162
161
 
163
162
  @state_file = File.join(state_dir, File.expand_path(log_file).sub(/^([A-Z]):\//, '\1/'))
164
163
  @bytes_to_skip = begin
@@ -196,7 +195,7 @@ class CheckLog < Sensu::Plugin::Check::CLI
196
195
  n_warns += 1
197
196
  end
198
197
  else
199
- if config[:only_warn]
198
+ if config[:only_warn] # rubocop:disable Style/IfInsideElse
200
199
  n_warns += 1
201
200
  else
202
201
  n_crits += 1
@@ -8,8 +8,8 @@
8
8
  # Released under the same terms as Sensu (the MIT license); see LICENSE for details.
9
9
 
10
10
  require 'sensu-handler'
11
- require 'json'
12
11
  require 'fileutils'
12
+ require 'json'
13
13
 
14
14
  class LogEvent < Sensu::Handler
15
15
  def handle
@@ -2,7 +2,7 @@ module SensuPluginsLogs
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- PATCH = 3
5
+ PATCH = 4
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,201 +1,164 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-logs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sensu-Plugins and contributors
8
8
  autorequire:
9
9
  bindir: bin
10
- cert_chain:
11
- - |
12
- -----BEGIN CERTIFICATE-----
13
- MIIDgDCCAmigAwIBAgIBATANBgkqhkiG9w0BAQUFADBDMRIwEAYDVQQDDAltYXR0
14
- am9uZXMxGDAWBgoJkiaJk/IsZAEZFgh5aWVsZGJvdDETMBEGCgmSJomT8ixkARkW
15
- A2NvbTAeFw0xNTAxMjgyMTAyNTFaFw0xNjAxMjgyMTAyNTFaMEMxEjAQBgNVBAMM
16
- CW1hdHRqb25lczEYMBYGCgmSJomT8ixkARkWCHlpZWxkYm90MRMwEQYKCZImiZPy
17
- LGQBGRYDY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyTSzVYnO
18
- CLgyrIyT1mBQakArQyW8xhi6MlDqyzXHJGeERT790U6EgoBVeS4XoK0ptFZNR8Tf
19
- zko0w+Nv47TarSCgkPOaxY+mxWnAVR10dOmfeLr7huiMyps+YD56/EF2FqQ3jf/+
20
- qohENfKD91qy1ieEy+Fn7Pf74ltbNKUdkb9a9eFXQ0DQ4ip5vik7DzjQkUTj4lca
21
- k6ArwnmHX4YDhZoYtrQJ8jVktN0/+NtA40M5qkCYHNe5tUW25b/tKVYuioxG6b2Z
22
- oIzaZxRLxf6HVAWpCVRT/F5+/yjigkX4u++eYacfLGleXQzoK7BL65vHGMJygWEE
23
- 0TKGqFOrl/L0AQIDAQABo38wfTAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNV
24
- HQ4EFgQUEf6a8Td7MrSZc8ImbLFZAENPbz0wIQYDVR0RBBowGIEWbWF0dGpvbmVz
25
- QHlpZWxkYm90LmNvbTAhBgNVHRIEGjAYgRZtYXR0am9uZXNAeWllbGRib3QuY29t
26
- MA0GCSqGSIb3DQEBBQUAA4IBAQBbzXAYA3BVGw8DZ0YYoY1VHPNEcH5qPIApmHO8
27
- rvSmuUT0yMEi7u00H/5uHRFf4LleGT/+sTdyXKsNPGT9kdRuQEgwi+vf7Zfvd8aX
28
- UF/+4VkEYf/8rV8Ere6u2QaWPgApdMV6JjKr1fAwCTd8AuGXNaWItiPPMseSQzLJ
29
- JKP4hVvbc1d+oS925B1lcBiqn2aYvElbyNAVmQPywNNqkWmvtlqj9ZVJfV5HQLdu
30
- 8sHuVruarogxxKPBzlL2is4EUb6oN/RdpGx2l4254+nyR+abg//Ed27Ym0PkB4lk
31
- HP0m8WSjZmFr109pE/sVsM5jtOCvogyujQOjNVGN4gz1wwPr
32
- -----END CERTIFICATE-----
33
- date: 2015-10-22 00:00:00.000000000 Z
10
+ cert_chain: []
11
+ date: 2016-03-12 00:00:00.000000000 Z
34
12
  dependencies:
35
- - !ruby/object:Gem::Dependency
36
- name: fileutils
37
- requirement: !ruby/object:Gem::Requirement
38
- requirements:
39
- - - '='
40
- - !ruby/object:Gem::Version
41
- version: '0.7'
42
- type: :runtime
43
- prerelease: false
44
- version_requirements: !ruby/object:Gem::Requirement
45
- requirements:
46
- - - '='
47
- - !ruby/object:Gem::Version
48
- version: '0.7'
49
13
  - !ruby/object:Gem::Dependency
50
14
  name: sensu-plugin
51
15
  requirement: !ruby/object:Gem::Requirement
52
16
  requirements:
53
- - - '='
17
+ - - ~>
54
18
  - !ruby/object:Gem::Version
55
- version: 1.2.0
19
+ version: '1.2'
56
20
  type: :runtime
57
21
  prerelease: false
58
22
  version_requirements: !ruby/object:Gem::Requirement
59
23
  requirements:
60
- - - '='
24
+ - - ~>
61
25
  - !ruby/object:Gem::Version
62
- version: 1.2.0
26
+ version: '1.2'
63
27
  - !ruby/object:Gem::Dependency
64
28
  name: bundler
65
29
  requirement: !ruby/object:Gem::Requirement
66
30
  requirements:
67
- - - "~>"
31
+ - - ~>
68
32
  - !ruby/object:Gem::Version
69
33
  version: '1.7'
70
34
  type: :development
71
35
  prerelease: false
72
36
  version_requirements: !ruby/object:Gem::Requirement
73
37
  requirements:
74
- - - "~>"
38
+ - - ~>
75
39
  - !ruby/object:Gem::Version
76
40
  version: '1.7'
77
41
  - !ruby/object:Gem::Dependency
78
42
  name: codeclimate-test-reporter
79
43
  requirement: !ruby/object:Gem::Requirement
80
44
  requirements:
81
- - - "~>"
45
+ - - ~>
82
46
  - !ruby/object:Gem::Version
83
47
  version: '0.4'
84
48
  type: :development
85
49
  prerelease: false
86
50
  version_requirements: !ruby/object:Gem::Requirement
87
51
  requirements:
88
- - - "~>"
52
+ - - ~>
89
53
  - !ruby/object:Gem::Version
90
54
  version: '0.4'
91
55
  - !ruby/object:Gem::Dependency
92
56
  name: github-markup
93
57
  requirement: !ruby/object:Gem::Requirement
94
58
  requirements:
95
- - - "~>"
59
+ - - ~>
96
60
  - !ruby/object:Gem::Version
97
61
  version: '1.3'
98
62
  type: :development
99
63
  prerelease: false
100
64
  version_requirements: !ruby/object:Gem::Requirement
101
65
  requirements:
102
- - - "~>"
66
+ - - ~>
103
67
  - !ruby/object:Gem::Version
104
68
  version: '1.3'
105
69
  - !ruby/object:Gem::Dependency
106
70
  name: pry
107
71
  requirement: !ruby/object:Gem::Requirement
108
72
  requirements:
109
- - - "~>"
73
+ - - ~>
110
74
  - !ruby/object:Gem::Version
111
75
  version: '0.10'
112
76
  type: :development
113
77
  prerelease: false
114
78
  version_requirements: !ruby/object:Gem::Requirement
115
79
  requirements:
116
- - - "~>"
80
+ - - ~>
117
81
  - !ruby/object:Gem::Version
118
82
  version: '0.10'
119
83
  - !ruby/object:Gem::Dependency
120
84
  name: rubocop
121
85
  requirement: !ruby/object:Gem::Requirement
122
86
  requirements:
123
- - - '='
87
+ - - ~>
124
88
  - !ruby/object:Gem::Version
125
- version: 0.32.1
89
+ version: '0.37'
126
90
  type: :development
127
91
  prerelease: false
128
92
  version_requirements: !ruby/object:Gem::Requirement
129
93
  requirements:
130
- - - '='
94
+ - - ~>
131
95
  - !ruby/object:Gem::Version
132
- version: 0.32.1
96
+ version: '0.37'
133
97
  - !ruby/object:Gem::Dependency
134
98
  name: rspec
135
99
  requirement: !ruby/object:Gem::Requirement
136
100
  requirements:
137
- - - "~>"
101
+ - - ~>
138
102
  - !ruby/object:Gem::Version
139
103
  version: '3.1'
140
104
  type: :development
141
105
  prerelease: false
142
106
  version_requirements: !ruby/object:Gem::Requirement
143
107
  requirements:
144
- - - "~>"
108
+ - - ~>
145
109
  - !ruby/object:Gem::Version
146
110
  version: '3.1'
147
111
  - !ruby/object:Gem::Dependency
148
112
  name: rake
149
113
  requirement: !ruby/object:Gem::Requirement
150
114
  requirements:
151
- - - "~>"
115
+ - - ~>
152
116
  - !ruby/object:Gem::Version
153
117
  version: '10.0'
154
118
  type: :development
155
119
  prerelease: false
156
120
  version_requirements: !ruby/object:Gem::Requirement
157
121
  requirements:
158
- - - "~>"
122
+ - - ~>
159
123
  - !ruby/object:Gem::Version
160
124
  version: '10.0'
161
125
  - !ruby/object:Gem::Dependency
162
126
  name: redcarpet
163
127
  requirement: !ruby/object:Gem::Requirement
164
128
  requirements:
165
- - - "~>"
129
+ - - ~>
166
130
  - !ruby/object:Gem::Version
167
131
  version: '3.2'
168
132
  type: :development
169
133
  prerelease: false
170
134
  version_requirements: !ruby/object:Gem::Requirement
171
135
  requirements:
172
- - - "~>"
136
+ - - ~>
173
137
  - !ruby/object:Gem::Version
174
138
  version: '3.2'
175
139
  - !ruby/object:Gem::Dependency
176
140
  name: yard
177
141
  requirement: !ruby/object:Gem::Requirement
178
142
  requirements:
179
- - - "~>"
143
+ - - ~>
180
144
  - !ruby/object:Gem::Version
181
145
  version: '0.8'
182
146
  type: :development
183
147
  prerelease: false
184
148
  version_requirements: !ruby/object:Gem::Requirement
185
149
  requirements:
186
- - - "~>"
150
+ - - ~>
187
151
  - !ruby/object:Gem::Version
188
152
  version: '0.8'
189
- description: |-
190
- This plugin provides native log instrumentation
191
- for monitoring, including: journald history, and
192
- regex matching. Includes various log handlers.
193
- email: "<sensu-users@googlegroups.com>"
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>
194
157
  executables:
195
- - handler-show-event-config.rb
196
- - handler-logevent.rb
197
- - check-log.rb
198
158
  - check-journal.rb
159
+ - check-log.rb
160
+ - handler-logevent.rb
161
+ - handler-show-event-config.rb
199
162
  extensions: []
200
163
  extra_rdoc_files: []
201
164
  files:
@@ -224,17 +187,17 @@ require_paths:
224
187
  - lib
225
188
  required_ruby_version: !ruby/object:Gem::Requirement
226
189
  requirements:
227
- - - ">="
190
+ - - ! '>='
228
191
  - !ruby/object:Gem::Version
229
192
  version: 1.9.3
230
193
  required_rubygems_version: !ruby/object:Gem::Requirement
231
194
  requirements:
232
- - - ">="
195
+ - - ! '>='
233
196
  - !ruby/object:Gem::Version
234
197
  version: '0'
235
198
  requirements: []
236
199
  rubyforge_project:
237
- rubygems_version: 2.4.8
200
+ rubygems_version: 2.4.5
238
201
  signing_key:
239
202
  specification_version: 4
240
203
  summary: Sensu plugins for logs
@@ -1,2 +0,0 @@
1
- ���L��$K�G<4y!u�A��s_���w���ɦx�胓�ǵ��s#]e�(#؊���vq��r���ato�7��B,lFpkA(טH�����pZ� ���� C�_�$�虲-��Gђf&���X��?��e�ǘ��V�[���n�ΜT�����RW:jwR��
2
- &]�`��Nqn8I/፞��� W��E� }���ڤ�W�j���a��*;V�f�.?�����I���ޢ�k�Z�rh}֦_��8mU�%
data.tar.gz.sig DELETED
Binary file
metadata.gz.sig DELETED
Binary file