sensu-plugins-haproxy 0.0.1.alpha.3 → 0.0.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
2
  SHA1:
3
- metadata.gz: f409b7d971bb6cc31322e9a84f54d5032f4cf1aa
4
- data.tar.gz: 09df82629d44efb21a9aa97215edddacddd42596
3
+ metadata.gz: 32e6ee493954780e4ef1d2332e6cb3ca2b1ef5f7
4
+ data.tar.gz: 45cd19221796e86f69a1c0e135c5f190fabc25fa
5
5
  SHA512:
6
- metadata.gz: e7d8f10b67cd3e0fdeb1980783c076c452ea4e0faf4280f1ca48855d1025f4a237d0b08eda464e895ad60e87b02a4897402b66450dbd51cf7b090a016fd503db
7
- data.tar.gz: 9e7afe3c5499025e63b17eaa48b02a2bb1bbe3f13a2574041db96224e5b6bc61eb53a3fc6b13657a64949c72de5e93a667b402fc8e398ffdb5bb61a884592a69
6
+ metadata.gz: be0864b5cea6d21678e1ea7f853822995af88188cd39d0780f3a2c89eb5ddd92fcf2784213cf842c5ce4f659d37e2bcac712b5dc5598c3a783a704f8c1590d46
7
+ data.tar.gz: 7c6a63b60b01b2eb58dc5577745d6450dbf0151a3f8d07380f0d90979417ce05d4e41d492c87d94ebf2674715d9b1802c36f284465a8ed54fe62c97a6d9220b5
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -1,14 +1,11 @@
1
- #### 0.0.1.alpha.1
1
+ #Change Log
2
+ This project adheres to [Semantic Versioning](http://semver.org/).
2
3
 
3
- * initial release, functionally identical to the community plugins repo
4
+ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachangelog.com/)
4
5
 
5
- #### 0.0.1.alpha.2
6
+ ## Unreleased][unreleased]
6
7
 
7
- * pin all development and runtime dependencies
8
+ ## 0.0.1 - 2015-05-21
8
9
 
9
- #### 0.0.1.alpha.3
10
-
11
- * update Vagrantfile
12
- * add gem metadata
13
- * modify .gitignore
14
- * add new version and bump methods and tasks
10
+ ### Added
11
+ - initial release
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2015 devops@yieldbot.com
1
+ Copyright (c) 2015 Sensu-Plugins
2
2
 
3
3
  MIT License
4
4
 
data/README.md CHANGED
@@ -5,6 +5,7 @@
5
5
  [![Code Climate](https://codeclimate.com/github/sensu-plugins/sensu-plugins-haproxy/badges/gpa.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-haproxy)
6
6
  [![Test Coverage](https://codeclimate.com/github/sensu-plugins/sensu-plugins-haproxy/badges/coverage.svg)](https://codeclimate.com/github/sensu-plugins/sensu-plugins-haproxy)
7
7
  [![Dependency Status](https://gemnasium.com/sensu-plugins/sensu-plugins-haproxy.svg)](https://gemnasium.com/sensu-plugins/sensu-plugins-haproxy)
8
+ [ ![Codeship Status for sensu-plugins/sensu-plugins-haproxy](https://codeship.com/projects/f196a180-d1e5-0132-1723-16c1124d299d/status?branch=master)](https://codeship.com/projects/77420)
8
9
 
9
10
  ## Functionality
10
11
 
@@ -16,39 +17,7 @@
16
17
 
17
18
  ## Installation
18
19
 
19
- Add the public key (if you haven’t already) as a trusted certificate
20
+ [Installation and Setup](https://github.com/sensu-plugins/documentation/blob/master/user_docs/installation_instructions.md)
20
21
 
21
- ```
22
- gem cert --add <(curl -Ls https://raw.githubusercontent.com/sensu-plugins/sensu-plugins.github.io/master/certs/sensu-plugins.pem)
23
- gem install sensu-plugins-haproxy -P MediumSecurity
24
- ```
25
-
26
- You can also download the key from /certs/ within each repository.
27
-
28
- #### Rubygems
29
-
30
- `gem install sensu-plugins-haproxy`
31
-
32
- #### Bundler
33
-
34
- Add *sensu-plugins-haproxy* to your Gemfile and run `bundle install` or `bundle update`
35
-
36
- #### Chef
37
-
38
- Using the Sensu **sensu_gem** LWRP
39
- ```
40
- sensu_gem 'sensu-plugins-haproxy' do
41
- options('--prerelease')
42
- version '0.0.1.alpha.1'
43
- end
44
- ```
45
-
46
- Using the Chef **gem_package** resource
47
- ```
48
- gem_package 'sensu-plugins-haproxy' do
49
- options('--prerelease')
50
- version '0.0.1.alpha.1'
51
- end
52
- ```
53
22
 
54
23
  ## Notes
data/bin/check-haproxy.rb CHANGED
@@ -113,7 +113,7 @@ class CheckHAProxy < Sensu::Plugin::Check::CLI
113
113
  warning
114
114
  end
115
115
  else
116
- percent_up = 100 * services.select { |svc| svc[:status] == 'UP' || svc[:status] == 'OPEN' }.size / services.size
116
+ percent_up = 100 * services.count { |svc| svc[:status] == 'UP' || svc[:status] == 'OPEN' } / services.size
117
117
  failed_names = services.reject { |svc| svc[:status] == 'UP' || svc[:status] == 'OPEN' }.map { |svc| svc[:svname] }
118
118
  critical_sessions = services.select { |svc| svc[:slim].to_i > 0 && (100 * svc[:scur].to_f / svc[:slim].to_f) > config[:session_crit_percent] }
119
119
  warning_sessions = services.select { |svc| svc[:slim].to_i > 0 && (100 * svc[:scur].to_f / svc[:slim].to_f) > config[:session_warn_percent] }
@@ -122,11 +122,11 @@ class CheckHAProxy < Sensu::Plugin::Check::CLI
122
122
  if percent_up < config[:crit_percent]
123
123
  critical status
124
124
  elsif !critical_sessions.empty?
125
- critical status + '; Active sessions critical: ' + critical_sessions.map { |s| "#{s[:scur]} #{s[:svname]}" }.join(', ')
125
+ critical status + '; Active sessions critical: ' + critical_sessions.map { |s| "#{s[:scur]} #{s[:pxname]}.#{s[:svname]}" }.join(', ')
126
126
  elsif percent_up < config[:warn_percent]
127
127
  warning status
128
128
  elsif !warning_sessions.empty?
129
- warning status + '; Active sessions warning: ' + warning_sessions.map { |s| "#{s[:scur]} #{s[:svname]}" }.join(', ')
129
+ warning status + '; Active sessions warning: ' + warning_sessions.map { |s| "#{s[:scur]} #{s[:pxname]}.#{s[:svname]}" }.join(', ')
130
130
  else
131
131
  ok status
132
132
  end
@@ -160,8 +160,12 @@ class HAProxyMetrics < Sensu::Plugin::Metric::CLI::Graphite
160
160
  output "#{config[:scheme]}.#{line[0]}.response_4xx", line[42]
161
161
  output "#{config[:scheme]}.#{line[0]}.response_5xx", line[43]
162
162
  output "#{config[:scheme]}.#{line[0]}.response_other", line[44]
163
- output "#{config[:scheme]}.#{line[0]}.requests_per_second", line[46]
164
- output "#{config[:scheme]}.#{line[0]}.requests_per_second_max", line[47]
163
+ unless line[46].nil?
164
+ output "#{config[:scheme]}.#{line[0]}.requests_per_second", line[46]
165
+ end
166
+ unless line[47].nil?
167
+ output "#{config[:scheme]}.#{line[0]}.requests_per_second_max", line[47]
168
+ end
165
169
  output "#{config[:scheme]}.#{line[0]}.queue_time", line[58]
166
170
  output "#{config[:scheme]}.#{line[0]}.connect_time", line[59]
167
171
  output "#{config[:scheme]}.#{line[0]}.response_time", line[60]
@@ -8,7 +8,7 @@ module SensuPluginsHAProxy
8
8
  MINOR = 0
9
9
  PATCH = 1
10
10
 
11
- VER_STRING = [MAJOR, MINOR, PATCH, 'alpha.3'].compact.join('.')
11
+ VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
12
12
 
13
13
  NAME = 'sensu-plugins-haproxy'
14
14
  BANNER = "#{NAME} v%s"
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-haproxy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.alpha.3
4
+ version: 0.0.1
5
5
  platform: ruby
6
6
  authors:
7
- - Yieldbot, Inc. and contributors
7
+ - Sensu-Plugins and contributors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain:
@@ -30,7 +30,7 @@ cert_chain:
30
30
  8sHuVruarogxxKPBzlL2is4EUb6oN/RdpGx2l4254+nyR+abg//Ed27Ym0PkB4lk
31
31
  HP0m8WSjZmFr109pE/sVsM5jtOCvogyujQOjNVGN4gz1wwPr
32
32
  -----END CERTIFICATE-----
33
- date: 2015-04-02 00:00:00.000000000 Z
33
+ date: 2015-05-22 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: sensu-plugin
@@ -52,28 +52,28 @@ dependencies:
52
52
  requirements:
53
53
  - - "~>"
54
54
  - !ruby/object:Gem::Version
55
- version: '0'
55
+ version: '0.4'
56
56
  type: :development
57
57
  prerelease: false
58
58
  version_requirements: !ruby/object:Gem::Requirement
59
59
  requirements:
60
60
  - - "~>"
61
61
  - !ruby/object:Gem::Version
62
- version: '0'
62
+ version: '0.4'
63
63
  - !ruby/object:Gem::Dependency
64
64
  name: rubocop
65
65
  requirement: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - '='
67
+ - - "~>"
68
68
  - !ruby/object:Gem::Version
69
- version: 0.17.0
69
+ version: '0.30'
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.17.0
76
+ version: '0.30'
77
77
  - !ruby/object:Gem::Dependency
78
78
  name: rspec
79
79
  requirement: !ruby/object:Gem::Requirement
@@ -192,7 +192,10 @@ metadata:
192
192
  maintainer: ''
193
193
  development_status: active
194
194
  production_status: unstable - testing recommended
195
- post_install_message:
195
+ release_draft: 'false'
196
+ release_prerelease: 'false'
197
+ post_install_message: You can use the embedded Ruby by setting EMBEDDED_RUBY=true
198
+ in /etc/default/sensu
196
199
  rdoc_options: []
197
200
  require_paths:
198
201
  - lib
@@ -203,14 +206,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
203
206
  version: 1.9.3
204
207
  required_rubygems_version: !ruby/object:Gem::Requirement
205
208
  requirements:
206
- - - ">"
209
+ - - ">="
207
210
  - !ruby/object:Gem::Version
208
- version: 1.3.1
211
+ version: '0'
209
212
  requirements: []
210
213
  rubyforge_project:
211
- rubygems_version: 2.2.2
214
+ rubygems_version: 2.4.6
212
215
  signing_key:
213
216
  specification_version: 4
214
217
  summary: Sensu plugins for working with haproxy
215
218
  test_files: []
216
- has_rdoc:
metadata.gz.sig CHANGED
Binary file