1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-16 22:50:10 +03:00

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

This commit is contained in:
Jan Orel 2020-05-22 14:54:32 +02:00
parent bb44f2b591
commit 781ad55da8
No known key found for this signature in database
GPG Key ID: C7B901ABAF4CFF1B
2 changed files with 13 additions and 1 deletions

View File

@ -255,6 +255,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,

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 = "",