sensu-plugins-mesos 0.1.0 → 0.1.1

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: 84ee38fcb6677025bad5a58469d268e8d23f5168
4
- data.tar.gz: cf5200233d9df4f9164e615465f6d8e62754709c
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ YWRlMTBkZmJmZjJiNDY0YmU5MWQxY2JhMDZiZWY5M2Q1NjhkMTE3ZQ==
5
+ data.tar.gz: !binary |-
6
+ YzMwZWNjZmU0OTRjYTU5NmZjZTYzYzVlNjViMzRlN2QyOGYzNjEwMg==
5
7
  SHA512:
6
- metadata.gz: 4ef6b59be43efa0a5bbf8f82cbcb312e52660cfd09414908bff24028bbd1bda81488c2b9616b45a418bf3f57acbc333cae96e7c379f17163e9a3a359ed22fc2c
7
- data.tar.gz: 0b254d5b6b13243362f14c9bb6b6f73d0c69d2e1215c480863d1ab39e31c5b200e47e835b95fe7f06ab0c0fa22abc12877ee815a3e1064f1863ddbfb8b7c8023
8
+ metadata.gz: !binary |-
9
+ MWYwYTY2NzE0MjE0ZTJkNGU5ODRlZjI5MmM4OTFjYjg1YTVlOTYwODk2MTlh
10
+ MzY1NjM5MGVkMGU1YzVkNjcyOTg2ZDc4MGZkOWU5MTEyMTI2OThjMmVkZWJm
11
+ MTQ0ZDU3N2Y4ZGJjNTJiMzE0N2I5MmE0ZTJhNDJmYWRjNDdhNTM=
12
+ data.tar.gz: !binary |-
13
+ MTc3N2U5OWFiM2E1NTI3Njk4MDU1NzQyMDIyNWRlY2E5NzJjZTJmMzhlNTUy
14
+ YTVkMTI1ZmFiZTliOGExM2FmNTg0NzA5MGQxNmQ0YWQ0MDVjMGVlNjM3NGZm
15
+ ZDliYzNjMTdhYzQwY2U5OTdjZTk4MjJiODg1ODk1ZDlkYTNkYmE=
@@ -3,10 +3,17 @@ 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
- ### [Unreeleased][unreleased]
6
+ ## [Unreleased]
7
7
 
8
- ## 0.1.0 - 2015-09-14
9
- ## Added
8
+ ## [0.1.1] - 2016-03-04
9
+ ### Added
10
+ - metrics-mesos.rb, metrics-marathon.rb: add port option
11
+
12
+ ### Changed
13
+ - Rubocop upgrade and cleanup
14
+
15
+ ## [0.1.0] - 2015-09-14
16
+ ### Added
10
17
  - Added a check comparing Marathon instances for a specific task against the configured minimum
11
18
 
12
19
  ## [0.0.4] - 2015-07-30
@@ -24,7 +31,6 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
24
31
  - Only create binstubs for Ruby scripts
25
32
 
26
33
  ## [0.0.2] - 2015-07-14
27
-
28
34
  ### Changed
29
35
  - updated sensu-plugin gem to 1.2.0
30
36
 
@@ -32,11 +38,11 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
32
38
  - Timeout option.
33
39
 
34
40
  ## 0.0.1 - 2015-05-21
35
-
36
41
  ### Added
37
42
  - initial release
38
43
 
39
- [unreleased]: https://github.com/sensu-plugins/sensu-plugins-mesos/compare/0.1.0...HEAD
40
- [0.0.5]: https://github.com/sensu-plugins/sensu-plugins-mesos/compare/0.0.4...0.1.0
41
- [0.0.3]: https://github.com/sensu-plugins/sensu-plugins-mesos/compare/0.0.2...0.0.4
44
+ [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-mesos/compare/0.1.1...HEAD
45
+ [0.1.1]: https://github.com/sensu-plugins/sensu-plugins-mesos/compare/0.1.0...0.1.1
46
+ [0.1.0]: https://github.com/sensu-plugins/sensu-plugins-mesos/compare/0.0.4...0.1.0
47
+ [0.0.4]: https://github.com/sensu-plugins/sensu-plugins-mesos/compare/0.0.2...0.0.4
42
48
  [0.0.2]: https://github.com/sensu-plugins/sensu-plugins-mesos/compare/0.0.1...0.0.2
data/README.md CHANGED
@@ -1,11 +1,10 @@
1
1
  ## Sensu-Plugins-mesos
2
2
 
3
- [ ![Build Status](https://travis-ci.org/sensu-plugins/sensu-plugins-mesos.svg?branch=master)](https://travis-ci.org/sensu-plugins/sensu-plugins-mesos)
3
+ [![Build Status](https://travis-ci.org/sensu-plugins/sensu-plugins-mesos.svg?branch=master)](https://travis-ci.org/sensu-plugins/sensu-plugins-mesos)
4
4
  [![Gem Version](https://badge.fury.io/rb/sensu-plugins-mesos.svg)](http://badge.fury.io/rb/sensu-plugins-mesos)
5
5
  [![Code Climate](https://codeclimate.com/github/sensu-plugins/sensu-plugins-mesos/badges/gpa.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-mesos)
6
6
  [![Test Coverage](https://codeclimate.com/github/sensu-plugins/sensu-plugins-mesos/badges/coverage.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-mesos)
7
7
  [![Dependency Status](https://gemnasium.com/sensu-plugins/sensu-plugins-mesos.svg)](https://gemnasium.com/sensu-plugins/sensu-plugins-mesos)
8
- [ ![Codeship Status for sensu-plugins/sensu-plugins-mesos](https://codeship.com/projects/b3dc94e0-dbf2-0132-3508-1e3fe125131b/status?branch=master)](https://codeship.com/projects/79837)
9
8
 
10
9
  ## Functionality
11
10
 
@@ -30,8 +30,8 @@ require 'sensu-plugin/check/cli'
30
30
  require 'rest-client'
31
31
 
32
32
  # Mesos default ports are defined here: http://mesos.apache.org/documentation/latest/configuration
33
- MASTER_DEFAULT_PORT = '5050'
34
- SLAVE_DEFAULT_PORT = '5051'
33
+ MASTER_DEFAULT_PORT = '5050'.freeze
34
+ SLAVE_DEFAULT_PORT = '5051'.freeze
35
35
 
36
36
  class MesosNodeStatus < Sensu::Plugin::Check::CLI
37
37
  option :server,
@@ -34,7 +34,7 @@ require 'socket'
34
34
  require 'json'
35
35
 
36
36
  class MarathonMetrics < Sensu::Plugin::Metric::CLI::Graphite
37
- SKIP_ROOT_KEYS = %w(version)
37
+ SKIP_ROOT_KEYS = %w(version).freeze
38
38
  option :scheme,
39
39
  description: 'Metric naming scheme',
40
40
  short: '-s SCHEME',
@@ -47,6 +47,13 @@ class MarathonMetrics < Sensu::Plugin::Metric::CLI::Graphite
47
47
  long: '--host SERVER',
48
48
  default: 'localhost'
49
49
 
50
+ option :port,
51
+ description: 'Marathon port',
52
+ short: '-p PORT',
53
+ long: '--port PORT',
54
+ required: false,
55
+ default: '8080'
56
+
50
57
  option :timeout,
51
58
  description: 'timeout in seconds',
52
59
  short: '-t TIMEOUT',
@@ -55,7 +62,7 @@ class MarathonMetrics < Sensu::Plugin::Metric::CLI::Graphite
55
62
  default: 5
56
63
 
57
64
  def run
58
- r = RestClient::Resource.new("http://#{config[:server]}:8080/metrics", timeout: config[:timeout]).get
65
+ r = RestClient::Resource.new("http://#{config[:server]}:#{config[:port]}/metrics", timeout: config[:timeout]).get
59
66
  all_metrics = JSON.parse(r)
60
67
  metric_groups = all_metrics.keys - SKIP_ROOT_KEYS
61
68
  metric_groups.each do |metric_groups_key|
@@ -33,6 +33,10 @@ require 'rest-client'
33
33
  require 'socket'
34
34
  require 'json'
35
35
 
36
+ # Mesos default ports are defined here: http://mesos.apache.org/documentation/latest/configuration
37
+ MASTER_DEFAULT_PORT = '5050'.freeze
38
+ SLAVE_DEFAULT_PORT = '5051'.freeze
39
+
36
40
  class MesosMetrics < Sensu::Plugin::Metric::CLI::Graphite
37
41
  option :mode,
38
42
  description: 'master or slave',
@@ -44,7 +48,7 @@ class MesosMetrics < Sensu::Plugin::Metric::CLI::Graphite
44
48
  description: 'Metric naming scheme',
45
49
  short: '-s SCHEME',
46
50
  long: '--scheme SCHEME',
47
- default: "#{Socket.gethostname}"
51
+ default: Socket.gethostname.to_s
48
52
 
49
53
  option :server,
50
54
  description: 'Mesos Host',
@@ -52,6 +56,12 @@ class MesosMetrics < Sensu::Plugin::Metric::CLI::Graphite
52
56
  long: '--host SERVER',
53
57
  default: 'localhost'
54
58
 
59
+ option :port,
60
+ description: "port (default #{MASTER_DEFAULT_PORT} for master, #{SLAVE_DEFAULT_PORT} for slave)",
61
+ short: '-p PORT',
62
+ long: '--port PORT',
63
+ required: false
64
+
55
65
  option :timeout,
56
66
  description: 'timeout in seconds',
57
67
  short: '-t TIMEOUT',
@@ -62,10 +72,10 @@ class MesosMetrics < Sensu::Plugin::Metric::CLI::Graphite
62
72
  def run
63
73
  case config[:mode]
64
74
  when 'master'
65
- port = '5050'
75
+ port = config[:port] || MASTER_DEFAULT_PORT
66
76
  uri = '/master/stats.json'
67
77
  when 'slave'
68
- port = '5051'
78
+ port = config[:port] || SLAVE_DEFAULT_PORT
69
79
  uri = '/slave(1)/stats.json'
70
80
  end
71
81
  scheme = "#{config[:scheme]}.mesos-#{config[:mode]}"
@@ -2,7 +2,7 @@ module SensuPluginsMesos
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- PATCH = 0
5
+ PATCH = 1
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,36 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-mesos
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.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-09-14 00:00:00.000000000 Z
10
+ cert_chain: []
11
+ date: 2016-03-04 00:00:00.000000000 Z
34
12
  dependencies:
35
13
  - !ruby/object:Gem::Dependency
36
14
  name: rest-client
@@ -50,151 +28,153 @@ dependencies:
50
28
  name: sensu-plugin
51
29
  requirement: !ruby/object:Gem::Requirement
52
30
  requirements:
53
- - - '='
31
+ - - ~>
54
32
  - !ruby/object:Gem::Version
55
- version: 1.2.0
33
+ version: '1.2'
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: 1.2.0
40
+ version: '1.2'
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
47
  version: '1.7'
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
54
  version: '1.7'
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
61
  version: '0.4'
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
68
  version: '0.4'
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
75
  version: '1.3'
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
82
  version: '1.3'
105
83
  - !ruby/object:Gem::Dependency
106
84
  name: pry
107
85
  requirement: !ruby/object:Gem::Requirement
108
86
  requirements:
109
- - - "~>"
87
+ - - ~>
110
88
  - !ruby/object:Gem::Version
111
89
  version: '0.10'
112
90
  type: :development
113
91
  prerelease: false
114
92
  version_requirements: !ruby/object:Gem::Requirement
115
93
  requirements:
116
- - - "~>"
94
+ - - ~>
117
95
  - !ruby/object:Gem::Version
118
96
  version: '0.10'
119
97
  - !ruby/object:Gem::Dependency
120
98
  name: rake
121
99
  requirement: !ruby/object:Gem::Requirement
122
100
  requirements:
123
- - - "~>"
101
+ - - ~>
124
102
  - !ruby/object:Gem::Version
125
103
  version: '10.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
110
  version: '10.0'
133
111
  - !ruby/object:Gem::Dependency
134
112
  name: redcarpet
135
113
  requirement: !ruby/object:Gem::Requirement
136
114
  requirements:
137
- - - "~>"
115
+ - - ~>
138
116
  - !ruby/object:Gem::Version
139
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
124
  version: '3.2'
147
125
  - !ruby/object:Gem::Dependency
148
126
  name: rspec
149
127
  requirement: !ruby/object:Gem::Requirement
150
128
  requirements:
151
- - - "~>"
129
+ - - ~>
152
130
  - !ruby/object:Gem::Version
153
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
138
  version: '3.1'
161
139
  - !ruby/object:Gem::Dependency
162
140
  name: rubocop
163
141
  requirement: !ruby/object:Gem::Requirement
164
142
  requirements:
165
- - - '='
143
+ - - ~>
166
144
  - !ruby/object:Gem::Version
167
- version: 0.32.1
145
+ version: '0.37'
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: 0.32.1
152
+ version: '0.37'
175
153
  - !ruby/object:Gem::Dependency
176
154
  name: yard
177
155
  requirement: !ruby/object:Gem::Requirement
178
156
  requirements:
179
- - - "~>"
157
+ - - ~>
180
158
  - !ruby/object:Gem::Version
181
159
  version: '0.8'
182
160
  type: :development
183
161
  prerelease: false
184
162
  version_requirements: !ruby/object:Gem::Requirement
185
163
  requirements:
186
- - - "~>"
164
+ - - ~>
187
165
  - !ruby/object:Gem::Version
188
166
  version: '0.8'
189
- description: Sensu plugins for checking mesos
190
- email: "<sensu-users@googlegroups.com>"
167
+ description: ! "This plugin provides navite Mesos instrumentation for monitoring\n
168
+ \ and metrics collection, including: service health
169
+ and metrics\n for Mesos, Chronos, and Marathon."
170
+ email: <sensu-users@googlegroups.com>
191
171
  executables:
192
- - metrics-mesos.rb
193
- - metrics-marathon.rb
194
- - check-mesos.rb
195
- - check-marathon.rb
196
- - check-marathon-task.rb
197
172
  - check-chronos.rb
173
+ - check-marathon-task.rb
174
+ - check-marathon.rb
175
+ - check-mesos.rb
176
+ - metrics-marathon.rb
177
+ - metrics-mesos.rb
198
178
  extensions: []
199
179
  extra_rdoc_files: []
200
180
  files:
@@ -225,17 +205,17 @@ require_paths:
225
205
  - lib
226
206
  required_ruby_version: !ruby/object:Gem::Requirement
227
207
  requirements:
228
- - - ">="
208
+ - - ! '>='
229
209
  - !ruby/object:Gem::Version
230
210
  version: 1.9.3
231
211
  required_rubygems_version: !ruby/object:Gem::Requirement
232
212
  requirements:
233
- - - ">="
213
+ - - ! '>='
234
214
  - !ruby/object:Gem::Version
235
215
  version: '0'
236
216
  requirements: []
237
217
  rubyforge_project:
238
- rubygems_version: 2.4.8
218
+ rubygems_version: 2.4.5
239
219
  signing_key:
240
220
  specification_version: 4
241
221
  summary: Sensu plugins for checking mesos
@@ -1,2 +0,0 @@
1
- ���И;ӻ�4�m� ẚ�)����X�b¼;����s�`U��X��ҡ�2h����'E�kAX-��� .��S��aŲ����p���K��V��/T��s5���B���!��1�$�މ�'����4��w����-�Į�6��
2
- ;L�_���������ij�L�E0kA\�(v�y?��0�,y��$?���nl�
data.tar.gz.sig DELETED
Binary file
metadata.gz.sig DELETED
@@ -1,2 +0,0 @@
1
- oݑ��r�\o������m���M㲠"H��k�1DZ[�dư��� DISAo�*���c�CS��޿g���|��׋�� od�\ڜ���6t9��`�q��
2
- �����1��i.�4�p��ʨL�q�B���%[=h� )�