foreman_graphite 0.0.2 → 0.0.3

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: dea1b6f1a05f27376578a57086f15a38787bb758
4
- data.tar.gz: 01b3b50d25919e07c103184f50480a75c9520b27
3
+ metadata.gz: a3423ac69147d684c3487371ecaa96ee37c2edfd
4
+ data.tar.gz: 6e425dec0f4b5dda826ca9e70cec19b8acc8be35
5
5
  SHA512:
6
- metadata.gz: 2c1843f1053da2828ecfa122c482d12e6b1ba68c29db53084c84ce783c11225fe28f964e63c756f1f8a550fd76670bf8370bce1b963b3ea80502650d85915c12
7
- data.tar.gz: fa5cf3ede36341e776db3bde74b055487fd9a4f6e8f164bd7e72d1f9ba4261735e2fb59a7fa32755aff289cdb854696303bcfcb47ee3d02953ba3135a1786bfd
6
+ metadata.gz: 8519b54fe5f2f16c6cfc5a3da3114033da1935446b0357d43150c32136205aad3d20e33c00805a5a7cc3a464dd25d1fae6dc00dea2c7cee7ceccd0f6ee7ba1cd
7
+ data.tar.gz: 79484e675d7d5af383f8ca7ae19c0101d00ab43c2bc4429b64ef0f194b0f01b72814633c01cb09349191295b86d84fca03da37c1ddbd67cdb6e60e07a405122a
data/README.md CHANGED
@@ -15,17 +15,11 @@ Example config file:
15
15
  ```yaml
16
16
  :graphite:
17
17
  :server: graphite:2003
18
- # results are aggregated in n seconds slices, defaults to 0
19
- #:slice: 60
20
- # send to graphite every n seconds - defaults to 0
21
- #:interval: 60
22
- # set the max age in seconds for records reanimation, defaults to 0
23
- #:cache: 4 * 60 * 60
24
18
  ```
25
19
 
26
20
  ## Copyright
27
21
 
28
- Copyright (c) 2014 Ohad Levy
22
+ Copyright (c) 2014-2015 Ohad Levy
29
23
 
30
24
  This program is free software: you can redistribute it and/or modify
31
25
  it under the terms of the GNU General Public License as published by
@@ -6,10 +6,7 @@ class ForemanGraphite::Client
6
6
 
7
7
  @client = GraphiteAPI.new(
8
8
  :graphite => (opts[:server] || "0.0.0.0:2003"), # required argument
9
- :prefix => ['theforeman', fqdn], # add example.prefix to each key
10
- :slice => (opts[:slice] || 0), # results are aggregated in 60 seconds slices
11
- :interval => (opts[:interval] || 0), # send to graphite every 60 seconds
12
- :cache => (opts[:cache] || 0) # set the max age in seconds for records reanimation
9
+ :prefix => ['theforeman', fqdn]
13
10
  )
14
11
  end
15
12
 
@@ -30,7 +30,11 @@ module ForemanGraphite
30
30
  value = payload[:value]
31
31
  key_name = "#{name.to_s.capitalize}.#{measurement}"
32
32
 
33
- @graphite.metrics key_name => (value || 1)
33
+ timeout(3) do
34
+ @graphite.metrics key_name => (value || 1)
35
+ end
36
+ rescue => e
37
+ Rails.logger.warn "Failed to communicate with graphite: #{e}"
34
38
  end
35
39
 
36
40
  ActiveSupport::Notifications.subscribe /performance/ do |name, start, finish, id, payload|
@@ -1,3 +1,3 @@
1
1
  module ForemanGraphite
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_graphite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ohad Levy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-14 00:00:00.000000000 Z
11
+ date: 2015-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: graphite-api
@@ -73,7 +73,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
73
73
  version: '0'
74
74
  requirements: []
75
75
  rubyforge_project:
76
- rubygems_version: 2.2.2
76
+ rubygems_version: 2.4.3
77
77
  signing_key:
78
78
  specification_version: 4
79
79
  summary: Adds graphite integration to foreman