sensu-plugins-haproxy 0.0.1.alpha.3 → 0.0.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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/CHANGELOG.md +7 -10
- data/LICENSE +1 -1
- data/README.md +2 -33
- data/bin/check-haproxy.rb +3 -3
- data/bin/metrics-haproxy.rb +6 -2
- data/lib/sensu-plugins-haproxy/version.rb +1 -1
- metadata +16 -14
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32e6ee493954780e4ef1d2332e6cb3ca2b1ef5f7
|
4
|
+
data.tar.gz: 45cd19221796e86f69a1c0e135c5f190fabc25fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
1
|
+
#Change Log
|
2
|
+
This project adheres to [Semantic Versioning](http://semver.org/).
|
2
3
|
|
3
|
-
|
4
|
+
This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachangelog.com/)
|
4
5
|
|
5
|
-
|
6
|
+
## Unreleased][unreleased]
|
6
7
|
|
7
|
-
|
8
|
+
## 0.0.1 - 2015-05-21
|
8
9
|
|
9
|
-
|
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
data/README.md
CHANGED
@@ -5,6 +5,7 @@
|
|
5
5
|
[](https://codeclimate.com/github/sensu-plugins/sensu-plugins-haproxy)
|
6
6
|
[](https://codeclimate.com/github/sensu-plugins/sensu-plugins-haproxy)
|
7
7
|
[](https://gemnasium.com/sensu-plugins/sensu-plugins-haproxy)
|
8
|
+
[ ](https://codeship.com/projects/77420)
|
8
9
|
|
9
10
|
## Functionality
|
10
11
|
|
@@ -16,39 +17,7 @@
|
|
16
17
|
|
17
18
|
## Installation
|
18
19
|
|
19
|
-
|
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.
|
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
|
data/bin/metrics-haproxy.rb
CHANGED
@@ -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
|
-
|
164
|
-
|
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]
|
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
|
4
|
+
version: 0.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
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-
|
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.
|
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.
|
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
|
-
|
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:
|
211
|
+
version: '0'
|
209
212
|
requirements: []
|
210
213
|
rubyforge_project:
|
211
|
-
rubygems_version: 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
|