bipbip 0.6.23 → 0.6.24

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: 5add0615083de3e6e65144b8d3e8595aeae99f92
4
- data.tar.gz: cc10bece60af5768c38c579244caca1f22de048f
3
+ metadata.gz: d84a0714c3feadc7135952068cd7e840862b57a3
4
+ data.tar.gz: a60be602facabc2e5e2708687b5fece64c37a707
5
5
  SHA512:
6
- metadata.gz: d37e21902e8c5e8aa61178fb341dd7c27a7e88e6204a9cb3192bdd0b138e7cfe3e968b9cc80f2d9a303331d836fbe4858df8e11fd62727f5b967dcd01ca669af
7
- data.tar.gz: 00678bbd5ce3c3ae3433052e3052be654182d97d6793855f59ce851873df70eef459fde451f294ade4771da87ec6bc69a51741d5b39c0113bd88ac16373242de
6
+ metadata.gz: e47333bd8964340f6995954a9ada78f9bed04ec8422024b64ef6716a073232b90ef232f71c9ea27c2fd310d06dc8eb5fb4583dec05f2ae3b077e962f1a3e47c2
7
+ data.tar.gz: 93e187100344e589c90f59b820c2da9f0b7ae14241247c906d00d3d91c74627d912f86617319d968d02af860c3fa751bef62d2d3a112aa5c6c4561fba18fb7cd
@@ -68,8 +68,10 @@ module Bipbip
68
68
  data['slow_queries_time_avg'] = slow_queries_status['total']['time'].to_f / (slow_queries_status['total']['count'].to_f.nonzero? || 1)
69
69
  data['slow_queries_time_max'] = slow_queries_status['max']['time']
70
70
 
71
- data['total_index_size'] = all_index_size / (1024 * 1024)
72
- data['total_index_size_percentage_of_memory'] = (all_index_size.to_f / total_system_memory.to_f) * 100
71
+ unless router?
72
+ data['total_index_size'] = all_index_size / (1024 * 1024)
73
+ data['total_index_size_percentage_of_memory'] = (all_index_size.to_f / total_system_memory.to_f) * 100
74
+ end
73
75
 
74
76
  data
75
77
  end
@@ -125,6 +127,10 @@ module Bipbip
125
127
  `free -b`.lines.to_a[1].split[1].to_i
126
128
  end
127
129
 
130
+ def router?
131
+ fetch_server_status['process'] == 'mongos'
132
+ end
133
+
128
134
  def fetch_slow_queries_status
129
135
  timestamp_last_check = slow_query_last_check
130
136
  time_period = Time.now - timestamp_last_check
@@ -1,3 +1,3 @@
1
1
  module Bipbip
2
- VERSION = '0.6.23'
2
+ VERSION = '0.6.24'
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.23
4
+ version: 0.6.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cargo Media