From e28f5d8d013c0d0fa737c9659aa71dbd04c556d4 Mon Sep 17 00:00:00 2001 From: "Ruben S. Montero" Date: Tue, 26 May 2020 16:07:58 +0200 Subject: [PATCH] M #-: auto for dummy monitoring. Checks --- src/im_mad/remotes/common.d/monitord-client.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/im_mad/remotes/common.d/monitord-client.rb b/src/im_mad/remotes/common.d/monitord-client.rb index 61eecf5ce4..1265bf3ca2 100644 --- a/src/im_mad/remotes/common.d/monitord-client.rb +++ b/src/im_mad/remotes/common.d/monitord-client.rb @@ -170,10 +170,14 @@ begin hostid = config.elements['HOST_ID'].text.to_s if host == 'auto' - if local? hyperv + if local? hyperv || hyperv == 'dummy' host = '127.0.0.1' else - host = ENV['SSH_CLIENT'].split.first + begin + host = ENV['SSH_CLIENT'].split.first + rescue + host = '' + end if host.to_s.empty? puts 'NETWORK/MONITOR_ADDRESS is "auto", but SSH_CLIENT unknown'