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:
parent
bb44f2b591
commit
781ad55da8
@ -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,
|
||||
|
@ -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 = "",
|
||||
|
Loading…
x
Reference in New Issue
Block a user