diff --git a/src/im_mad/remotes/lib/probe_db.rb b/src/im_mad/remotes/lib/probe_db.rb index 2a6ffd2ce9..b40e488795 100644 --- a/src/im_mad/remotes/lib/probe_db.rb +++ b/src/im_mad/remotes/lib/probe_db.rb @@ -104,7 +104,7 @@ class VirtualMachineDB last = @db.execute("SELECT MAX(timestamp) from #{@dataset}").flatten![0] last ||= @mtime.to_i - return sync_status(@host, @host_id) if last == 0 || time > (last + @conf[:sync]) + return sync_status(@host, @host_id) if last == 0 || time > (last + @conf[:sync].to_i) status_str = '' monitor_ids = [] diff --git a/src/im_mad/remotes/lxd-probes.d/vm/status/state.rb b/src/im_mad/remotes/lxd-probes.d/vm/status/state.rb index fb2b9902e7..1e95b3cc74 100755 --- a/src/im_mad/remotes/lxd-probes.d/vm/status/state.rb +++ b/src/im_mad/remotes/lxd-probes.d/vm/status/state.rb @@ -55,7 +55,7 @@ host_id = ARGV[-2] begin config = REXML::Document.new(xml_txt).root - sync = config.elements['PROBES_PERIOD/SYNC_STATE_VM'].text.to_s + sync = config.elements['PROBES_PERIOD/SYNC_STATE_VM'].text.to_i rescue StandardError sync = 180 end