bipbip 0.6.8 → 0.6.9

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,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 334c4a2cf9c0c11478f524f0e6316d71de27a055
4
- data.tar.gz: 6c48b47f6ca4668bde7aa7345d7e4e7eb8532613
3
+ metadata.gz: f7f6055107baef535ccd9d5a079752b3c1836c52
4
+ data.tar.gz: de7005db500c6c76faef89422769476f92559f09
5
5
  SHA512:
6
- metadata.gz: bed5bf43747499e9874fa1cff47eb3774f002ce8fda0bda28d7243a7462a530060182f2deead017cbf4723a2bbf74122f7c3a30ed7ada2bb483dc7f78de816ad
7
- data.tar.gz: 05e7335084e0c941c9c26ab3181f4dce7d9b405b1b7930023afcacac7f1f3d3f276d8963b3451a50998bd0a2b3a2cbb6677bb3bc576f2d9065316cb1e4fd5795
6
+ metadata.gz: d4a6b7544e996f4bd00c429d275da2e00cf56f3ecdf1908dacc04652ca288c71a1fee8b0983acd5f1b2b0c4df7fb7900e83e56a424278db52676e097e917fcfb
7
+ data.tar.gz: 1107adf3baeffd8be0a7035bc26748652f776c044f3fcd3a61d2f99ea6b5bf58bc81c5e42b3669bfe88f2806b479826c96f30e90a87a2129c1a5cb865491f69f
@@ -2,11 +2,11 @@ require 'monit'
2
2
 
3
3
  module Bipbip
4
4
  class Plugin::Monit < Plugin
5
- # See https://bitbucket.org/tildeslash/monit/src/d60968cf7972cc902e5b6e2961d44456e1d9b736/src/monit.h?at=master#monit.h-145
6
- STATE_FAILED = '1'
7
-
8
5
  # See https://bitbucket.org/tildeslash/monit/src/d60968cf7972cc902e5b6e2961d44456e1d9b736/src/monit.h?at=master#monit.h-135
9
- MONITOR_NOT = '0'
6
+ MONITOR_NOT = 0x0
7
+ MONITOR_YES = 0x1
8
+ MONITOR_INIT = 0x2
9
+ MONITOR_WAITING = 0x4
10
10
 
11
11
  def metrics_schema
12
12
  [
@@ -30,7 +30,9 @@ module Bipbip
30
30
  begin
31
31
  data['Running'] = status.get ? 1 : 0
32
32
  data['All_Services_ok'] = status.services.any? do |service|
33
- service.monitor == MONITOR_NOT || service.status == STATE_FAILED
33
+ error_flags_bitmap = service.status.to_i
34
+ monitor_status = service.monitor.to_i
35
+ (monitor_status == MONITOR_NOT) || (error_flags_bitmap != 0)
34
36
  end ? 0 : 1
35
37
  rescue
36
38
  data['Running'] = 0
@@ -1,3 +1,3 @@
1
1
  module Bipbip
2
- VERSION = '0.6.8'
2
+ VERSION = '0.6.9'
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.6.8
4
+ version: 0.6.9
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: 2015-12-29 00:00:00.000000000 Z
13
+ date: 2015-12-31 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: copperegg-revealmetrics