bipbip 0.2.1 → 0.2.2

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: 0dddc26953a67802ee6093893f0e97dd68e74d51
4
- data.tar.gz: e89421a5c593613ac75969a5f600aa4d419ad77c
3
+ metadata.gz: 433fdde4a9b2144a2a91baae4db5cbaa8be7c1aa
4
+ data.tar.gz: 5c4dd948262df1f2316671762f79ec736b3af8f4
5
5
  SHA512:
6
- metadata.gz: f9916e81ad68c2592a09f0ed051bdb622005409a9ec8f5b86bcce916625388df7a3a85e1ccbdfb8a80fbb25637ca07db18954ae9cf74afe2f979cd23db5e1a80
7
- data.tar.gz: 54f0019b468297488d327487acf90276c4d5acace60b3c0524f1a76a5443ca31f5c8961d00dd8f5258f0576d5c8c98db0e0c2d3da0442e04a80586d91f3779a3
6
+ metadata.gz: 5a5e22ca08f87579060db60e031c86316ded9b2f8eeba1cec4735e0d4778084ad9ce381e15d47dc13dff3f3e2bcd864f8e0e12970977613f5dbf7b9d37afe7c5
7
+ data.tar.gz: b1754c55a86c4eb27baa658a73654e91f43c83495019fcf50c96baac5dd674f52460198192c2ad5ac34a8de9b91510f585a5bc6ce157ed98b3e3dbc528a838d0
data/README.md CHANGED
@@ -54,6 +54,9 @@ services:
54
54
  -
55
55
  plugin: nginx
56
56
  url: http://localhost:80/server-status
57
+ -
58
+ plugin: php-fpm
59
+ url: http://localhost:80/status?json
57
60
  -
58
61
  plugin: network
59
62
  -
@@ -0,0 +1,23 @@
1
+ module Bipbip
2
+
3
+ class Plugin::PhpFpm < Plugin
4
+
5
+ def metrics_schema
6
+ [
7
+ {:name => 'accepted conn', :type => 'counter', :unit => 'Connections'},
8
+ {:name => 'listen queue', :type => 'gauge', :unit => 'Connections'},
9
+ {:name => 'active processes', :type => 'gauge', :unit => 'Processes'},
10
+ ]
11
+ end
12
+
13
+ def monitor
14
+ uri = URI.parse(config['url'])
15
+ response = Net::HTTP.get_response(uri)
16
+ raise "Invalid response from server at #{config['url']}" unless response.code == '200'
17
+
18
+ status = JSON.parse(response.body)
19
+
20
+ status.reject{|k, v| !metrics_names.include?(k)}
21
+ end
22
+ end
23
+ end
@@ -1,3 +1,3 @@
1
1
  module Bipbip
2
- VERSION = '0.2.1'
2
+ VERSION = '0.2.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.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cargo Media
@@ -127,6 +127,7 @@ files:
127
127
  - lib/bipbip/plugin/network.rb
128
128
  - lib/bipbip/plugin/nginx.rb
129
129
  - lib/bipbip/plugin/php_apc.rb
130
+ - lib/bipbip/plugin/php_fpm.rb
130
131
  - lib/bipbip/plugin/redis.rb
131
132
  - lib/bipbip/plugin.rb
132
133
  - lib/bipbip/storage/copperegg.rb