riemann-redis 0.1.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +8 -8
  2. data/README.md +6 -0
  3. data/bin/riemann-redis +4 -4
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ODEzOWFkNTY1ZTgzMjVlY2I1MjRkODcwYjVjNjZhODQxMWQ5YTIyYw==
4
+ YTU2YjRiYTY4YWM1NDgxNmEyYzE4YWU5NjE4OTAzMTQ4ODUzZmM4Zg==
5
5
  data.tar.gz: !binary |-
6
- Mzc4OWU0M2FlODNhODhmNGVjYmUxYmM5NmY2NjFmNjI0YWE1MDE2NQ==
6
+ N2NlYWNjMWM5ZjI0ODYzMjU2YWU5Yzc5MWI0MmY1ZGYxYWVjNDhhNQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MjRhZjYxNWQwMDU3ZDUzMGQ3NDBhODUzOThlNThjOTNkNGE2NDQxNzM3Zjc0
10
- Zjg0YWY1YjcwMDdlM2UwOGYwYzViMzg3N2MwNzc2YzNkOTQ0MTBlM2M1ZDIw
11
- MTFmZjAwMDEzM2ZmNzI5Nzc4MjM2NWMzZTE3ODNjMDI5YTQyNWQ=
9
+ YzlhMWRmMTZjNzM1Y2IwN2E5MzA3ZTdjNmI4ZjgyMzM1NDZlZmFkZGRjMzA0
10
+ MTNkNDY3ZjA4NzFlYjY3NTFmM2M3MTBkZmViOTlkZTc1ZTNjODAyMDI1M2Zj
11
+ MjkyMTE3NjI5YjI5NDJlNGQ1MDdhMTEwOTNmNmU2YmU4YzZiNzY=
12
12
  data.tar.gz: !binary |-
13
- YzBjYWJjMDMwOWM2YzdiMjBkZDhmYmM2ZWFkYzgwNzNhNjg5YzViMGYxNTFh
14
- N2VhMjU0MzBjYzVlOTY0YjJlZTQ3OWYwMzk0ZWE2OWNkOTJhNmFhYTEyZWUw
15
- N2FmZjNiY2I3MDY0OTMzYzRlZTY4NWVmZTBiOWI4MzIxZGJmNDE=
13
+ NmI3ZGU5YWZlOGI2NzViYzczNWJiZDdhYTk2ZmJmODM3OGVjZGQ1MWEyZWVm
14
+ YTI0NWVkNGUwNzhkYTBjNWMxMzczMjk2ZWM5M2ZlNzM3MGY5ZjFiMjgwMmU1
15
+ N2Q2OWYxMGUyOTY2N2Q5YjY2ZDllMjcwMzI0OGQzODQ5OTdkYWY=
data/README.md CHANGED
@@ -15,3 +15,9 @@ gem install riemann-redis
15
15
  riemann-redis --help
16
16
  riemann-redis-slowlog --help
17
17
  ```
18
+
19
+ Multiple --redis-sections can by specified, for example if you want to monitor both Memory and Replication
20
+
21
+ ``` bash
22
+ riemann-redis --redis-section "Replication" --redis-section "Memory"
23
+ ```
data/bin/riemann-redis CHANGED
@@ -13,7 +13,7 @@ class Riemann::Tools::Redis
13
13
  opt :redis_password, "Redis password", :default => ''
14
14
  opt :redis_url, "Redis URL", :default => ''
15
15
  opt :redis_socket, "Redis socket", :default => ''
16
- opt :redis_section, "Redis INFO section, multiple values separated by spaces", :default => 'default'
16
+ opt :redis_section, "Redis INFO section", :type => String, :multi => true, :default => 'default'
17
17
 
18
18
  STRING_VALUES = %w{ redis_version redis_git_sha1 redis_mode os
19
19
  multiplexing_api gcc_version run_id used_memory_human
@@ -30,7 +30,7 @@ class Riemann::Tools::Redis
30
30
  end
31
31
  @redis = ::Redis.new(options)
32
32
  @redis.auth(opts[:redis_password]) unless opts[:redis_password] == ''
33
- @section = opts[:redis_section].split
33
+ @section = opts[:redis_section]
34
34
  end
35
35
 
36
36
  def tick
@@ -40,7 +40,7 @@ class Riemann::Tools::Redis
40
40
  data = {
41
41
  :host => opts[:redis_host].dup,
42
42
  :service => "redis #{property}",
43
- :metric => value.to_f,
43
+ :metric => value.to_s,
44
44
  :state => value.to_s,
45
45
  :tags => ['redis']
46
46
  }
@@ -56,7 +56,7 @@ class Riemann::Tools::Redis
56
56
  if property == "run_id"
57
57
  data[:metric] = 0
58
58
  end
59
-
59
+ puts data[:metric]
60
60
  report(data)
61
61
  end
62
62
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: riemann-redis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fede Borgnia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-28 00:00:00.000000000 Z
11
+ date: 2014-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: riemann-tools