lib/splash/daemon/orchestrator.rb in prometheus-splash-0.8.6 vs lib/splash/daemon/orchestrator.rb in prometheus-splash-0.9.0
- old
+ new
@@ -98,13 +98,13 @@
if @config.logs.empty? then
@log.item "No logs to monitor"
else
sched,value = @config.daemon_procmon_scheduling.flatten
@log.item "Initializing logs monitorings & notifications."
- @log_result = LogScanner::new
@server.send sched,value do
begin
+ @log_result = LogScanner::new
session = get_session
@metric_manager.inc_logs_monitoring
@log.trigger "Logs monitoring for Scheduling : #{sched.to_s} #{value.to_s}", session
@log_result.analyse
@log_result.notify :session => session
@@ -120,12 +120,12 @@
if @config.processes.empty? then
@log.item "No processes to monitor"
else
sched,value = @config.daemon_logmon_scheduling.flatten
@log.item "Initializing processes monitorings & notifications."
- @process_result = ProcessScanner::new
@server.send sched,value do
begin
+ @process_result = ProcessScanner::new
session = get_session
@metric_manager.inc_processes_monitoring
@log.trigger "Processes monitoring for Scheduling : #{sched.to_s} #{value.to_s}", session
@process_result.analyse
@process_result.notify :session => session