Added support for floating-point value rate monitoring #6

Merged
merged 1 commit into from Aug 11, 2012
View
2 lib/ostrichpoll.rb
@@ -74,4 +74,4 @@ module OstrichPoll
exit EXIT_ERROR # exit with error
end
-exit OstrichPoll::EXIT_OK
+exit OstrichPoll::EXIT_OK
View
4 lib/ostrichpoll/ostrich_validator.rb
@@ -109,8 +109,8 @@ def verify!
def check (value)
Log.debug "#{host_instance.url} | Given: #{metric}=#{value}"
- if !value.is_a? Integer
- value = Integer(value) rescue nil
+ if !value.is_a? Float
+ value = Float(value) rescue nil
end
# error on missing value unless we ignore missing