M #-: Detect MONITOR_ADDRESS if set to "auto"

This commit is contained in:
Ruben S. Montero authored and GitHub committed 2020-05-25 15:08:45 +02:00
commit fe0513e985
2 files changed
+13 -1

No files matched your search

@@ -254,6 +254,15 @@ begin
pubkey = config.elements['NETWORK/PUBKEY'].text.to_s
hostid = config.elements['HOST_ID'].text.to_s
if host == 'auto'
host = ENV['SSH_CLIENT'].split.first
if host.to_s.empty?
puts 'NETWORK/MONITOR_ADDRESS is "auto", but SSH_CLIENT unknown'
exit(-1)
end
end
probes = {
:system_host_udp => {
:period => config.elements['PROBES_PERIOD/SYSTEM_HOST'].text.to_s,
+4 -1
View File
@@ -60,6 +60,9 @@ LOG = [
#
# addresss : network address to bind the UDP listener to.
# monitor_address: agents will send updates to this monitor address
# if "auto" is used, agents will detect the address
# from the ssh connection frontend -> host ($SSH_CLIENT),
# "auto" is not usable for HA setup
#
# port : listening port
# threads : number of processing threads
@@ -68,7 +71,7 @@ LOG = [
#*******************************************************************************
NETWORK = [
ADDRESS = "0.0.0.0",
MONITOR_ADDRESS = 127.0.0.1,
MONITOR_ADDRESS = "auto",
PORT = 4124,
THREADS = 8,
PUBKEY = "",