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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3f166e8d86ad822ab9ec354ee518feb60c082d73
4
- data.tar.gz: 1ec147877cbe8561c78989d75251a87ae0e30b30
3
+ metadata.gz: 45274bbe7182dd672c7dc5f66ed08516335fdf30
4
+ data.tar.gz: 81a7a317a3957a9de8a15816b27cb44317b2aa2f
5
5
  SHA512:
6
- metadata.gz: c665e20a80f264605ce236adfd07108942ada4d8e60079e9fe2e8c2f0e488a49dbde05bb3dec047403782d77c9fa54e8362f9bd1bb4198213ff1c7f28a4527fd
7
- data.tar.gz: 0c9fce0000b89f46c8efee69f1e09124916219c2323c1c3613a55707fef2cca6e1860b6cd87ab9e570eaf175297f6253a31fdb3c2e230ff1a4f9836b71b36b23
6
+ metadata.gz: 9d1da584fef95f69371667bd892e1cb70541f31d192a2cd449e67a824361a4edcb2ee37414817a1eff985884e40622858958df5130dfee672e417a3760bc47a4
7
+ data.tar.gz: 7d0aa96409b2ccad6ede7ebb39274c01ba8453c87eae5f526d003b71f5b0141bb882231d5fff0e21867b993885ccf11f9e05ceb2f6af7af7dc1028ecb9459089
@@ -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| service.monitor != '1' || service.status != '0' } ? 0 : 1
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
@@ -1,3 +1,3 @@
1
1
  module Bipbip
2
- VERSION = '0.3.1'
2
+ VERSION = '0.3.2'
3
3
  end
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.1
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-06-23 00:00:00.000000000 Z
13
+ date: 2014-07-17 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: copperegg