sensu-plugins-php-fpm 0.0.3 → 0.0.4

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: 5be073f67c9b2902c71752bebbcb96c03d78debd
4
- data.tar.gz: 6e4117f70bfae28d76180ac35519e692a8b18e11
3
+ metadata.gz: 0409db6176a627ed03f67747a6ff888a375a1b43
4
+ data.tar.gz: 47e147add855f3d266d4483f3a6a41e6297eb96d
5
5
  SHA512:
6
- metadata.gz: cfdc44a3671b3feccdd854e567fd61adab59679487b6a929881cad5428f810ba8143125e2777a509f94fb6d24fe67e11eade9bc93e1b16989028212fad8de3a3
7
- data.tar.gz: 5d40aa63afe14d7e43e07899df8a9718e97b4a7503ec094704cdcf5f0c972144206b1d53993d51c4b109f7c847e4f86193f53e2c46d5b4b67108d56023c8ce43
6
+ metadata.gz: d08ebf03fc983756a258278c533dd033d4b918d78758197d38125664db9039d2cd0ede46ff49703cde5a48cfda7b31da95a93f9e060ffbac6698ad7357f75bcb
7
+ data.tar.gz: f761a4acf4533e22485a5f137fa4903543075f7cceab1f01196311050c56f59a5ba170e7d062f7e270cd10f586edc047b556dc3a2cecd09daec07d14a092bc36
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -3,7 +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][unreleased]
6
+ ## Unreleased
7
+
8
+ ## [0.0.4] - 2015-09-21
9
+ ### Added
10
+ - ability to make insecure https connections
7
11
 
8
12
  ## [0.0.3] - 2015-07-14
9
13
  ### Changed
@@ -22,3 +26,7 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
22
26
  ### Added
23
27
  - initial release
24
28
 
29
+ [unreleased]: https://github.com/sensu-plugins/sensu-plugins-php-fpm/compare/0.0.4...HEAD
30
+ [0.0.4]: https://github.com/sensu-plugins/sensu-plugins-php-fpm/compare/0.0.3...0.0.4
31
+ [0.0.3]: https://github.com/sensu-plugins/sensu-plugins-php-fpm/compare/0.0.2...0.0.3
32
+ [0.0.2]: https://github.com/sensu-plugins/sensu-plugins-php-fpm/compare/0.0.1...0.0.2
data/README.md CHANGED
@@ -34,6 +34,6 @@ location ~ "/fpm-(status|ping)" {
34
34
 
35
35
  ## Installation
36
36
 
37
- [Installation and Setup](https://github.com/sensu-plugins/documentation/blob/master/user_docs/installation_instructions.md)
37
+ [Installation and Setup](http://sensu-plugins.io/docs/installation_instructions.html)
38
38
 
39
39
  ## Notes
data/bin/check-php-fpm.rb CHANGED
@@ -13,11 +13,22 @@
13
13
  # sensu-plugin Ruby gem
14
14
  # php-fpm ping configuration
15
15
  #
16
+ # USAGE:
17
+ # ./check-php-fpm.rb --host ${hostname}
18
+ #
19
+ # For hosts with a CA-signed SSL certificate
20
+ # ./check-php-fpm.rb --host ${hostname} --port 443 --ssl
21
+ #
22
+ # For hosts with a self-signed SSL certificate
23
+ # ./check-php-fpm.rb --host ${hostname} --port 443 --ssl --insecure
24
+ #
25
+ #
16
26
  # Released under the same terms as Sensu (the MIT license); see LICENSE
17
27
  # for details.
18
28
 
19
29
  require 'sensu-plugin/check/cli'
20
30
  require 'net/http'
31
+ require 'net/https'
21
32
  require 'uri'
22
33
  require 'socket'
23
34
 
@@ -58,6 +69,21 @@ class CheckPHPFpm < Sensu::Plugin::Check::CLI
58
69
  long: '--response RESPONSE',
59
70
  default: 'pong'
60
71
 
72
+ option :ssl,
73
+ description: 'Enabling SSL connections',
74
+ short: '-l',
75
+ long: '--ssl',
76
+ boolean: true,
77
+ description: 'Enabling SSL connections',
78
+ default: false
79
+
80
+ option :insecure,
81
+ short: '-k',
82
+ long: '--insecure',
83
+ boolean: true,
84
+ description: 'Enabling insecure connections',
85
+ default: false
86
+
61
87
  def run
62
88
  config[:url] = config[:scheme] + config[:hostname].to_s + ':' + config[:port].to_s + '/' + config[:path].to_s + config[:pool].to_s
63
89
  config[:fqdn] = Socket.gethostname
@@ -65,6 +91,12 @@ class CheckPHPFpm < Sensu::Plugin::Check::CLI
65
91
 
66
92
  request = Net::HTTP::Get.new(uri.request_uri)
67
93
  http = Net::HTTP.new(uri.host, uri.port)
94
+
95
+ if config[:ssl]
96
+ http.use_ssl = true
97
+ http.verify_mode = OpenSSL::SSL::VERIFY_NONE if config[:insecure]
98
+ end
99
+
68
100
  response = http.request(request)
69
101
 
70
102
  if response.code == '200'
@@ -37,7 +37,7 @@ class PhpfpmMetrics < Sensu::Plugin::Metric::CLI::Graphite
37
37
  found = false
38
38
  attempts = 0
39
39
  # #YELLOW
40
- until found || attempts >= 10 # rubocop:disable Style/Next
40
+ until found || attempts >= 10
41
41
  attempts += 1
42
42
  if config[:url]
43
43
  uri = URI.parse(config[:url])
@@ -2,7 +2,7 @@ module SensuPluginsPhpFpm
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
data.tar.gz.sig CHANGED
@@ -1,2 +1 @@
1
- ���%�#2a"6�����]N
2
- �T�"PWa[�6y,�5��sWx4NNO�4�Ͼ�,�UW��R��c�N�
1
+ ��5A�pr��S@ �r�/����{�v���d�̬��1,���4N�szp�ij�n��CdJJ�3mLSZ��\����ȕC=Y��
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-php-fpm
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
@@ -30,7 +30,7 @@ cert_chain:
30
30
  8sHuVruarogxxKPBzlL2is4EUb6oN/RdpGx2l4254+nyR+abg//Ed27Ym0PkB4lk
31
31
  HP0m8WSjZmFr109pE/sVsM5jtOCvogyujQOjNVGN4gz1wwPr
32
32
  -----END CERTIFICATE-----
33
- date: 2015-07-14 00:00:00.000000000 Z
33
+ date: 2015-09-21 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: crack
@@ -61,61 +61,61 @@ dependencies:
61
61
  - !ruby/object:Gem::Version
62
62
  version: 1.2.0
63
63
  - !ruby/object:Gem::Dependency
64
- name: codeclimate-test-reporter
64
+ name: bundler
65
65
  requirement: !ruby/object:Gem::Requirement
66
66
  requirements:
67
67
  - - "~>"
68
68
  - !ruby/object:Gem::Version
69
- version: '0.4'
69
+ version: '1.7'
70
70
  type: :development
71
71
  prerelease: false
72
72
  version_requirements: !ruby/object:Gem::Requirement
73
73
  requirements:
74
74
  - - "~>"
75
75
  - !ruby/object:Gem::Version
76
- version: '0.4'
76
+ version: '1.7'
77
77
  - !ruby/object:Gem::Dependency
78
- name: rubocop
78
+ name: codeclimate-test-reporter
79
79
  requirement: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - '='
81
+ - - "~>"
82
82
  - !ruby/object:Gem::Version
83
- version: '0.30'
83
+ version: '0.4'
84
84
  type: :development
85
85
  prerelease: false
86
86
  version_requirements: !ruby/object:Gem::Requirement
87
87
  requirements:
88
- - - '='
88
+ - - "~>"
89
89
  - !ruby/object:Gem::Version
90
- version: '0.30'
90
+ version: '0.4'
91
91
  - !ruby/object:Gem::Dependency
92
- name: rspec
92
+ name: github-markup
93
93
  requirement: !ruby/object:Gem::Requirement
94
94
  requirements:
95
95
  - - "~>"
96
96
  - !ruby/object:Gem::Version
97
- version: '3.1'
97
+ version: '1.3'
98
98
  type: :development
99
99
  prerelease: false
100
100
  version_requirements: !ruby/object:Gem::Requirement
101
101
  requirements:
102
102
  - - "~>"
103
103
  - !ruby/object:Gem::Version
104
- version: '3.1'
104
+ version: '1.3'
105
105
  - !ruby/object:Gem::Dependency
106
- name: bundler
106
+ name: pry
107
107
  requirement: !ruby/object:Gem::Requirement
108
108
  requirements:
109
109
  - - "~>"
110
110
  - !ruby/object:Gem::Version
111
- version: '1.7'
111
+ version: '0.10'
112
112
  type: :development
113
113
  prerelease: false
114
114
  version_requirements: !ruby/object:Gem::Requirement
115
115
  requirements:
116
116
  - - "~>"
117
117
  - !ruby/object:Gem::Version
118
- version: '1.7'
118
+ version: '0.10'
119
119
  - !ruby/object:Gem::Dependency
120
120
  name: rake
121
121
  requirement: !ruby/object:Gem::Requirement
@@ -131,61 +131,61 @@ dependencies:
131
131
  - !ruby/object:Gem::Version
132
132
  version: '10.0'
133
133
  - !ruby/object:Gem::Dependency
134
- name: github-markup
134
+ name: redcarpet
135
135
  requirement: !ruby/object:Gem::Requirement
136
136
  requirements:
137
137
  - - "~>"
138
138
  - !ruby/object:Gem::Version
139
- version: '1.3'
139
+ version: '3.2'
140
140
  type: :development
141
141
  prerelease: false
142
142
  version_requirements: !ruby/object:Gem::Requirement
143
143
  requirements:
144
144
  - - "~>"
145
145
  - !ruby/object:Gem::Version
146
- version: '1.3'
146
+ version: '3.2'
147
147
  - !ruby/object:Gem::Dependency
148
- name: redcarpet
148
+ name: rubocop
149
149
  requirement: !ruby/object:Gem::Requirement
150
150
  requirements:
151
- - - "~>"
151
+ - - '='
152
152
  - !ruby/object:Gem::Version
153
- version: '3.2'
153
+ version: 0.32.1
154
154
  type: :development
155
155
  prerelease: false
156
156
  version_requirements: !ruby/object:Gem::Requirement
157
157
  requirements:
158
- - - "~>"
158
+ - - '='
159
159
  - !ruby/object:Gem::Version
160
- version: '3.2'
160
+ version: 0.32.1
161
161
  - !ruby/object:Gem::Dependency
162
- name: yard
162
+ name: rspec
163
163
  requirement: !ruby/object:Gem::Requirement
164
164
  requirements:
165
165
  - - "~>"
166
166
  - !ruby/object:Gem::Version
167
- version: '0.8'
167
+ version: '3.1'
168
168
  type: :development
169
169
  prerelease: false
170
170
  version_requirements: !ruby/object:Gem::Requirement
171
171
  requirements:
172
172
  - - "~>"
173
173
  - !ruby/object:Gem::Version
174
- version: '0.8'
174
+ version: '3.1'
175
175
  - !ruby/object:Gem::Dependency
176
- name: pry
176
+ name: yard
177
177
  requirement: !ruby/object:Gem::Requirement
178
178
  requirements:
179
179
  - - "~>"
180
180
  - !ruby/object:Gem::Version
181
- version: '0.10'
181
+ version: '0.8'
182
182
  type: :development
183
183
  prerelease: false
184
184
  version_requirements: !ruby/object:Gem::Requirement
185
185
  requirements:
186
186
  - - "~>"
187
187
  - !ruby/object:Gem::Version
188
- version: '0.10'
188
+ version: '0.8'
189
189
  description: Sensu plugins for php-fpm
190
190
  email: "<sensu-users@googlegroups.com>"
191
191
  executables:
@@ -227,7 +227,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
227
227
  version: '0'
228
228
  requirements: []
229
229
  rubyforge_project:
230
- rubygems_version: 2.4.6
230
+ rubygems_version: 2.4.8
231
231
  signing_key:
232
232
  specification_version: 4
233
233
  summary: Sensu plugins for php-fpm
metadata.gz.sig CHANGED
Binary file