bipbip 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bipbip/plugin/monit.rb +7 -1
- data/lib/bipbip/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 45274bbe7182dd672c7dc5f66ed08516335fdf30
|
4
|
+
data.tar.gz: 81a7a317a3957a9de8a15816b27cb44317b2aa2f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d1da584fef95f69371667bd892e1cb70541f31d192a2cd449e67a824361a4edcb2ee37414817a1eff985884e40622858958df5130dfee672e417a3760bc47a4
|
7
|
+
data.tar.gz: 7d0aa96409b2ccad6ede7ebb39274c01ba8453c87eae5f526d003b71f5b0141bb882231d5fff0e21867b993885ccf11f9e05ceb2f6af7af7dc1028ecb9459089
|
data/lib/bipbip/plugin/monit.rb
CHANGED
@@ -4,6 +4,11 @@ module Bipbip
|
|
4
4
|
|
5
5
|
class Plugin::Monit < Plugin
|
6
6
|
|
7
|
+
#See https://bitbucket.org/tildeslash/monit/src/d60968cf7972cc902e5b6e2961d44456e1d9b736/src/monit.h?at=master#cl-135
|
8
|
+
# https://bitbucket.org/tildeslash/monit/src/d60968cf7972cc902e5b6e2961d44456e1d9b736/src/monit.h?at=master#cl-146
|
9
|
+
STATE_FAILED = '1'
|
10
|
+
MONITOR_NOT = '0'
|
11
|
+
|
7
12
|
def metrics_schema
|
8
13
|
[
|
9
14
|
{:name => 'Running', :type => 'gauge', :unit => 'Boolean'},
|
@@ -25,7 +30,8 @@ module Bipbip
|
|
25
30
|
|
26
31
|
begin
|
27
32
|
data['Running'] = status.get ? 1 : 0
|
28
|
-
data['All_Services_ok'] = status.services.any? { |service|
|
33
|
+
data['All_Services_ok'] = status.services.any? { |service|
|
34
|
+
service.monitor == MONITOR_NOT || service.status == STATE_FAILED } ? 0 : 1
|
29
35
|
rescue
|
30
36
|
data['Running'] = 0
|
31
37
|
data['All_Services_ok'] = 0
|
data/lib/bipbip/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bipbip
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cargo Media
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-
|
13
|
+
date: 2014-07-17 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: copperegg
|