riemann-rpush 0.0.1 → 0.0.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: e72b0525a70a526db7a3a8e4c97e301465550100
4
- data.tar.gz: 0c0ae2608d03d6be448175063ad754cdddfb2a06
3
+ metadata.gz: dfdc6d42c9cfea06e55463d2e2efb08d6ceec731
4
+ data.tar.gz: 1f6f0ed5c5716200839115ee5e864c16f6fa7c44
5
5
  SHA512:
6
- metadata.gz: c2d41e369ed4358b45b469f0f9370ffceac0792bf145234c6b497644755b1b498dbf58ab553cf3217d760a0f7edce3427525ad74195de589115adf7f71c44a64
7
- data.tar.gz: 96b7608d9dcbd2995d448305bcf90a5dbfeb46fab82cedeb095cea92e0267ee861fa1d2491e1b3871d78a119d05f76e222c745354b933b91de88438953fa574e
6
+ metadata.gz: 8171d95c73acabdef5ff63df679c46ea5b42f10996e7074c86315bfc5aa40831994fa6552e29dbf74d99995fd27041c98e40586e41f8113b14fd5233664d45e1
7
+ data.tar.gz: fea3c45d270261827cbaa56a4f5f952750899dbf5f978cf91b5a2fa366b6aaeff0ed28e72b847cbf71af40b63e7fd08da8b560b8844b27b35ba076e229c733bf
data/README.md ADDED
@@ -0,0 +1,4 @@
1
+ Riemann Rpush
2
+ =============
3
+
4
+ Riemann Rpush agent.
data/bin/riemann-rpush ADDED
@@ -0,0 +1,28 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # Riemann agent to collect Rpush metrics
4
+
5
+ require 'redis'
6
+ require 'riemann/tools'
7
+
8
+ class Riemann::Tools::Rpush
9
+ include Riemann::Tools
10
+
11
+ opt :redis_url, "Redis URL", :default => ''
12
+
13
+ def initialize
14
+ @redis = ::Redis.new({url: opts[:redis_url]})
15
+ end
16
+
17
+ def tick
18
+ queue_size = @redis.scard('rpush:notifications:all')
19
+ msg = {
20
+ metric: queue_size,
21
+ service: 'rpush queue size',
22
+ state: 'ok'
23
+ }
24
+ report msg
25
+ end
26
+ end
27
+
28
+ Riemann::Tools::Rpush.run
@@ -0,0 +1,23 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "riemann-rpush"
7
+ spec.version = '0.0.2'
8
+ spec.authors = ["Fernando Alonso"]
9
+ spec.email = ["krakatoa1987@gmail.com"]
10
+ spec.summary = %q{Riemann agent to collect Rpush metrics}
11
+ spec.description = %q{Riemann agent to collect Rpush metrics}
12
+ spec.homepage = "https://github.com/krakatoa/riemann-rpush"
13
+ spec.license = "MIT"
14
+
15
+ spec.files = `git ls-files -z`.split("\x0")
16
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
+ spec.require_paths = ["lib"]
19
+
20
+ spec.add_runtime_dependency "riemann-tools", "~> 0.2.6"
21
+ spec.add_runtime_dependency 'redis', '>= 3.2.1'
22
+ spec.add_development_dependency "bundler", "~> 1.6"
23
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: riemann-rpush
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fernando Alonso
@@ -55,11 +55,15 @@ dependencies:
55
55
  description: Riemann agent to collect Rpush metrics
56
56
  email:
57
57
  - krakatoa1987@gmail.com
58
- executables: []
58
+ executables:
59
+ - riemann-rpush
59
60
  extensions: []
60
61
  extra_rdoc_files: []
61
62
  files:
62
63
  - LICENSE
64
+ - README.md
65
+ - bin/riemann-rpush
66
+ - riemann-rpush.gemspec
63
67
  homepage: https://github.com/krakatoa/riemann-rpush
64
68
  licenses:
65
69
  - MIT