sensu-plugins-sftp 0.0.2 → 2.1.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
- SHA1:
3
- metadata.gz: 2a876f19359cbb6e9c818ffac7a8876fe8278476
4
- data.tar.gz: 2abd6199a4e3333fcd1dfdada2034d6bf4054367
2
+ SHA256:
3
+ metadata.gz: f35784e210a52c2bb374c83949c2eb6534a3787cb9886e1b99534d7419d29059
4
+ data.tar.gz: 7c52494e1e1fbd13d879f9dedccee765ba7b45754c59eb9920c42be39713a57e
5
5
  SHA512:
6
- metadata.gz: b6c0f151ef5fe0e8748c39662e4e5bf9c6bc100f0f8680e0c2a4d69e00aea9946f2b9cc18f47978c96ddb53ddecbea25e7c74f91c497d4bf56d947b6b31bec71
7
- data.tar.gz: da6e5cf871240cc6865b1ca45a51f99a99f5ffe7310a963976904a3fd4cdb8f3cc565758335990bca1e0429f29c042d35e68abe01278a10250a1390dce283b30
6
+ metadata.gz: 5c3cf54f097b09cf983f29e00534a5f6b36752c9e297d08d80f0fcf9b2b1d834f7a9c87aed7dbab30a7d0dafa08308cea2b2e9269fd52713529e67adaeb23cf0
7
+ data.tar.gz: 80b9ec4a42352b20815e75eb87755df55d12087230f193fa27e37d189be25fcf203cf3841c5973230d9965542caac30b048853a8e85f9aa4b19bd940daab5029
@@ -3,14 +3,65 @@ 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][unreleased]
6
+ ## [Unreleased]
7
+
8
+ ## [2.1.1] - 2020-06-25
9
+ ### Changed
10
+ - Change frozen_string_literal to false in the check
11
+
12
+ ## [2.1.0] - 2020-05-15
13
+ ### Added
14
+ - Bonsai asset support, missed .bonsai.yml before
15
+
16
+ ### Changed
17
+ - Updated net-sftp dependency to '3.0.0'
18
+
19
+ ## [2.0.0] - 2020-05-15
20
+ ### Breaking Changes
21
+ - Update minimum required ruby version to 2.3. Drop unsupported ruby versions.
22
+ - Bump `sensu-plugin` dependency to `~> 4.0`
23
+
24
+ ### Added
25
+ - Bonsai asset support
26
+ ### Changed
27
+ - Updated bundler dependancy to '~> 2.1'
28
+ - Updated rubocop dependency to '~> 0.81.0'
29
+ - Remediated rubocop issues
30
+ - Updated rake dependency to '~> 13.0'
31
+ - Updated net-sftp dependency to '2.1.2'
32
+
33
+ ## [1.0.1] - 2017-09-20
34
+ ### Fixed
35
+ - Corrected Auth Method in Net::SFTP.start (@makaveli0129)
36
+
37
+ ### Added
38
+ - Ruby 2.4.1 testing
39
+
40
+ ## [1.0.0] - 2016-09-25
41
+ ### Removed
42
+ - Ruby 1.9.3 support
43
+
44
+ ### Added
45
+ - Ruby 2.3.0 support
46
+
47
+ ### Fixed
48
+ - uninitialized constant CheckSftp::Timeout error (@nickptrvc)
49
+
50
+ ### Changed
51
+ - Update to rubocop 0.40 and cleanup
7
52
 
8
53
  ## [0.0.2] - 2015-07-14
9
54
  ### Changed
10
55
  - updated sensu-plugin gem to 1.2.0
11
56
 
12
- ## [0.0.1] - 2015-07-04
13
-
57
+ ## 0.0.1 - 2015-07-04
14
58
  ### Added
15
59
  - initial release
16
60
 
61
+ [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-sftp/compare/2.1.1...HEAD
62
+ [2.1.1]: https://github.com/sensu-plugins/sensu-plugins-sftp/compare/2.1.0...2.1.1
63
+ [2.1.0]: https://github.com/sensu-plugins/sensu-plugins-sftp/compare/2.0.0...2.1.0
64
+ [2.0.0]: https://github.com/sensu-plugins/sensu-plugins-sftp/compare/1.0.1...2.0.0
65
+ [1.0.1]: https://github.com/sensu-plugins/sensu-plugins-sftp/compare/1.0.0...1.0.1
66
+ [1.0.0]: https://github.com/sensu-plugins/sensu-plugins-sftp/compare/0.0.2...1.0.0
67
+ [0.0.2]: https://github.com/sensu-plugins/sensu-plugins-sftp/compare/0.0.1...0.0.2
data/README.md CHANGED
@@ -1,11 +1,10 @@
1
1
  ## Sensu-Plugins-sftp
2
2
 
3
- [ ![Build Status](https://travis-ci.org/sensu-plugins/sensu-plugins-sftp.svg?branch=master)](https://travis-ci.org/sensu-plugins/sensu-plugins-sftp)
3
+ [![Build Status](https://travis-ci.org/sensu-plugins/sensu-plugins-sftp.svg?branch=master)](https://travis-ci.org/sensu-plugins/sensu-plugins-sftp)
4
4
  [![Gem Version](https://badge.fury.io/rb/sensu-plugins-sftp.svg)](http://badge.fury.io/rb/sensu-plugins-sftp)
5
5
  [![Code Climate](https://codeclimate.com/github/sensu-plugins/sensu-plugins-sftp/badges/gpa.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-sftp)
6
6
  [![Test Coverage](https://codeclimate.com/github/sensu-plugins/sensu-plugins-sftp/badges/coverage.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-sftp)
7
7
  [![Dependency Status](https://gemnasium.com/sensu-plugins/sensu-plugins-sftp.svg)](https://gemnasium.com/sensu-plugins/sensu-plugins-sftp)
8
- [ ![Codeship Status for sensu-plugins/sensu-plugins-sftp](https://codeship.com/projects/169f4700-e8a5-0132-af9a-62885e5c211b/status?branch=master)](https://codeship.com/projects/82853)
9
8
 
10
9
  ## Functionality
11
10
 
@@ -16,6 +15,6 @@
16
15
 
17
16
  ## Installation
18
17
 
19
- [Installation and Setup](https://github.com/sensu-plugins/documentation/blob/master/user_docs/installation_instructions.md)
18
+ [Installation and Setup](http://sensu-plugins.io/docs/installation_instructions.html)
20
19
 
21
20
  ## Notes
@@ -1,4 +1,6 @@
1
1
  #! /usr/bin/env ruby
2
+ # frozen_string_literal: false
3
+
2
4
  #
3
5
  # check-sftp
4
6
  #
@@ -104,23 +106,20 @@ class CheckSftp < Sensu::Plugin::Check::CLI
104
106
  end
105
107
 
106
108
  ok
107
- rescue Timeout::Error
108
- critical "Timed out after #{config[:timeout]}s"
109
109
  rescue SocketError => e
110
110
  critical "Could not connect: #{e.inspect}"
111
111
  rescue Net::SSH::AuthenticationFailed
112
112
  critical "Failed authentication with #{config[:username]}"
113
113
  rescue Net::SFTP::StatusException => e
114
114
  critical "SFTP Error - #{e.message}"
115
- rescue => e
115
+ rescue => e # rubocop: disable Style/RescueStandardError
116
116
  critical "Unexpected error; #{e.inspect}"
117
117
  end
118
118
 
119
119
  private
120
120
 
121
121
  def check_file_write
122
- # #YELLOW
123
- if config[:check_prefix] # rubocop:disable GuardClause
122
+ if config[:check_prefix]
124
123
  io = StringIO.new('Generated from Sensu at ' + Time.now.to_s)
125
124
  remote_path = File.join('', config[:directory], config[:check_prefix] + "_#{Time.now.to_i}.txt")
126
125
  sftp.upload!(io, remote_path)
@@ -129,15 +128,13 @@ class CheckSftp < Sensu::Plugin::Check::CLI
129
128
  end
130
129
 
131
130
  def check_file_count
132
- # #YELLOW
133
- if config[:check_count] # rubocop:disable GuardClause
131
+ if config[:check_count]
134
132
  critical "Too many files - #{config[:directory]} has #{matching_files.count} matching files" if matching_files.count > config[:check_count]
135
133
  end
136
134
  end
137
135
 
138
136
  def check_file_age
139
- # #YELLOW
140
- if config[:check_older] # rubocop:disable GuardClause
137
+ if config[:check_older]
141
138
  run_at = Time.now
142
139
  old_files = matching_files.select { |f| (run_at.to_i - f.attributes.mtime) > config[:check_older] }
143
140
  unless old_files.empty?
@@ -151,6 +148,9 @@ class CheckSftp < Sensu::Plugin::Check::CLI
151
148
  end
152
149
 
153
150
  def sftp
154
- @sftp ||= Net::SFTP.start(config[:host], config[:username], password: config[:password], timeout: config[:timeout], port: config[:port])
151
+ @sftp ||= Net::SFTP.start(config[:host], config[:username], password: config[:password],
152
+ timeout: config[:timeout],
153
+ port: config[:port],
154
+ auth_methods: %w[publickey password])
155
155
  end
156
156
  end
@@ -1 +1,3 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'sensu-plugins-sftp/version'
@@ -1,9 +1,11 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module SensuPluginsSftp
2
4
  # This defines the version of the gem
3
5
  module Version
4
- MAJOR = 0
5
- MINOR = 0
6
- PATCH = 2
6
+ MAJOR = 2
7
+ MINOR = 1
8
+ PATCH = 1
7
9
 
8
10
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
9
11
  end
metadata CHANGED
@@ -1,107 +1,85 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-sftp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 2.1.1
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-07-14 00:00:00.000000000 Z
10
+ cert_chain: []
11
+ date: 2020-06-26 00:00:00.000000000 Z
34
12
  dependencies:
35
13
  - !ruby/object:Gem::Dependency
36
- name: sensu-plugin
14
+ name: net-sftp
37
15
  requirement: !ruby/object:Gem::Requirement
38
16
  requirements:
39
17
  - - '='
40
18
  - !ruby/object:Gem::Version
41
- version: 1.2.0
19
+ version: 3.0.0
42
20
  type: :runtime
43
21
  prerelease: false
44
22
  version_requirements: !ruby/object:Gem::Requirement
45
23
  requirements:
46
24
  - - '='
47
25
  - !ruby/object:Gem::Version
48
- version: 1.2.0
26
+ version: 3.0.0
49
27
  - !ruby/object:Gem::Dependency
50
- name: net-sftp
28
+ name: sensu-plugin
51
29
  requirement: !ruby/object:Gem::Requirement
52
30
  requirements:
53
- - - '='
31
+ - - "~>"
54
32
  - !ruby/object:Gem::Version
55
- version: 2.1.0
33
+ version: '4.0'
56
34
  type: :runtime
57
35
  prerelease: false
58
36
  version_requirements: !ruby/object:Gem::Requirement
59
37
  requirements:
60
- - - '='
38
+ - - "~>"
61
39
  - !ruby/object:Gem::Version
62
- version: 2.1.0
40
+ version: '4.0'
63
41
  - !ruby/object:Gem::Dependency
64
42
  name: bundler
65
43
  requirement: !ruby/object:Gem::Requirement
66
44
  requirements:
67
45
  - - "~>"
68
46
  - !ruby/object:Gem::Version
69
- version: '1.7'
47
+ version: '2.1'
70
48
  type: :development
71
49
  prerelease: false
72
50
  version_requirements: !ruby/object:Gem::Requirement
73
51
  requirements:
74
52
  - - "~>"
75
53
  - !ruby/object:Gem::Version
76
- version: '1.7'
54
+ version: '2.1'
77
55
  - !ruby/object:Gem::Dependency
78
56
  name: codeclimate-test-reporter
79
57
  requirement: !ruby/object:Gem::Requirement
80
58
  requirements:
81
59
  - - "~>"
82
60
  - !ruby/object:Gem::Version
83
- version: '0.4'
61
+ version: '1.0'
84
62
  type: :development
85
63
  prerelease: false
86
64
  version_requirements: !ruby/object:Gem::Requirement
87
65
  requirements:
88
66
  - - "~>"
89
67
  - !ruby/object:Gem::Version
90
- version: '0.4'
68
+ version: '1.0'
91
69
  - !ruby/object:Gem::Dependency
92
70
  name: github-markup
93
71
  requirement: !ruby/object:Gem::Requirement
94
72
  requirements:
95
73
  - - "~>"
96
74
  - !ruby/object:Gem::Version
97
- version: '1.3'
75
+ version: '3.0'
98
76
  type: :development
99
77
  prerelease: false
100
78
  version_requirements: !ruby/object:Gem::Requirement
101
79
  requirements:
102
80
  - - "~>"
103
81
  - !ruby/object:Gem::Version
104
- version: '1.3'
82
+ version: '3.0'
105
83
  - !ruby/object:Gem::Dependency
106
84
  name: pry
107
85
  requirement: !ruby/object:Gem::Requirement
@@ -117,61 +95,61 @@ dependencies:
117
95
  - !ruby/object:Gem::Version
118
96
  version: '0.10'
119
97
  - !ruby/object:Gem::Dependency
120
- name: rubocop
98
+ name: rake
121
99
  requirement: !ruby/object:Gem::Requirement
122
100
  requirements:
123
- - - '='
101
+ - - "~>"
124
102
  - !ruby/object:Gem::Version
125
- version: '0.30'
103
+ version: '13.0'
126
104
  type: :development
127
105
  prerelease: false
128
106
  version_requirements: !ruby/object:Gem::Requirement
129
107
  requirements:
130
- - - '='
108
+ - - "~>"
131
109
  - !ruby/object:Gem::Version
132
- version: '0.30'
110
+ version: '13.0'
133
111
  - !ruby/object:Gem::Dependency
134
- name: rspec
112
+ name: redcarpet
135
113
  requirement: !ruby/object:Gem::Requirement
136
114
  requirements:
137
115
  - - "~>"
138
116
  - !ruby/object:Gem::Version
139
- version: '3.1'
117
+ version: '3.2'
140
118
  type: :development
141
119
  prerelease: false
142
120
  version_requirements: !ruby/object:Gem::Requirement
143
121
  requirements:
144
122
  - - "~>"
145
123
  - !ruby/object:Gem::Version
146
- version: '3.1'
124
+ version: '3.2'
147
125
  - !ruby/object:Gem::Dependency
148
- name: rake
126
+ name: rspec
149
127
  requirement: !ruby/object:Gem::Requirement
150
128
  requirements:
151
129
  - - "~>"
152
130
  - !ruby/object:Gem::Version
153
- version: '10.0'
131
+ version: '3.1'
154
132
  type: :development
155
133
  prerelease: false
156
134
  version_requirements: !ruby/object:Gem::Requirement
157
135
  requirements:
158
136
  - - "~>"
159
137
  - !ruby/object:Gem::Version
160
- version: '10.0'
138
+ version: '3.1'
161
139
  - !ruby/object:Gem::Dependency
162
- name: redcarpet
140
+ name: rubocop
163
141
  requirement: !ruby/object:Gem::Requirement
164
142
  requirements:
165
143
  - - "~>"
166
144
  - !ruby/object:Gem::Version
167
- version: '3.2'
145
+ version: 0.81.0
168
146
  type: :development
169
147
  prerelease: false
170
148
  version_requirements: !ruby/object:Gem::Requirement
171
149
  requirements:
172
150
  - - "~>"
173
151
  - !ruby/object:Gem::Version
174
- version: '3.2'
152
+ version: 0.81.0
175
153
  - !ruby/object:Gem::Dependency
176
154
  name: yard
177
155
  requirement: !ruby/object:Gem::Requirement
@@ -186,7 +164,10 @@ dependencies:
186
164
  - - "~>"
187
165
  - !ruby/object:Gem::Version
188
166
  version: '0.8'
189
- description: Sensu sftp plugins
167
+ description: |-
168
+ This plugin provides native SFTP instrumentation
169
+ for monitoring, including: service connectivity,
170
+ file write access, and more
190
171
  email: "<sensu-users@googlegroups.com>"
191
172
  executables:
192
173
  - check-sftp.rb
@@ -217,7 +198,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
217
198
  requirements:
218
199
  - - ">="
219
200
  - !ruby/object:Gem::Version
220
- version: 1.9.3
201
+ version: 2.3.0
221
202
  required_rubygems_version: !ruby/object:Gem::Requirement
222
203
  requirements:
223
204
  - - ">="
@@ -225,7 +206,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
225
206
  version: '0'
226
207
  requirements: []
227
208
  rubyforge_project:
228
- rubygems_version: 2.4.6
209
+ rubygems_version: 2.7.7
229
210
  signing_key:
230
211
  specification_version: 4
231
212
  summary: Sensu plugins for sftp
@@ -1 +0,0 @@
1
- #��tx�g�{������&r0y��I�lk��;��6����~�K��B�!u����b�Ԥ�؉B����u<Cp?�+nL��.��T+'�Bc�i�J���Wm����P��#$k��G�dg{5u���e�yʹ7iπ�����=�cG�+�j�S�JY�",��D���`}6o��\/>��q�ޅ)c�.
data.tar.gz.sig DELETED
@@ -1 +0,0 @@
1
- �V:�'���|T5IF��mS����N���qh (b�������&$PsJp1��F(A�T���pxzN�{/�3�5���!~�jp����W�c$��CE�$^�T q'>
metadata.gz.sig DELETED
Binary file