riemann-babbler 0.2.6 → 0.2.7
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.
- data/lib/riemann/babbler/plugin.rb +5 -2
- data/lib/riemann/version.rb +1 -1
- metadata +1 -1
@@ -33,7 +33,10 @@ module Riemann
|
|
33
33
|
alias :opts :options
|
34
34
|
|
35
35
|
def report(event)
|
36
|
-
|
36
|
+
case event[:metric]
|
37
|
+
when Hash
|
38
|
+
report_with_diff(event) and return
|
39
|
+
end
|
37
40
|
event[:tags] = options.riemann.tags unless options.riemann.tags.nil?
|
38
41
|
event[:host] = host
|
39
42
|
log.debug "Report status: #{event.inspect}"
|
@@ -45,7 +48,7 @@ module Riemann
|
|
45
48
|
event[:metric][:value] = current_metric - @storage[ event[:service] ] if @storage.has_key? event[:service]
|
46
49
|
@storage[ event[:service] ] = current_metric
|
47
50
|
event[:state] = state(current_metric) unless plugin.states.critical.nil?
|
48
|
-
event
|
51
|
+
event[:metric] = event[:metric][:value]
|
49
52
|
report(event)
|
50
53
|
end
|
51
54
|
|
data/lib/riemann/version.rb
CHANGED