1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-02-28 17:57:22 +03:00

F #3859: Fix VM_STATE monitoring (#4360)

* F #3859: Fix VM_STATE monitoring

* F #3859: Remove obsolete settings from oned.conf

* F #3859: Monitor logging
This commit is contained in:
Pavel Czerný 2020-03-16 09:32:32 +01:00 committed by GitHub
parent 59e32e3c72
commit eeb334b6f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 10 deletions

View File

@ -12,7 +12,6 @@
# MONITORING_INTERVAL_DATASTORE: Time in seconds between image monitorization.
# MONITORING_INTERVAL_DB_UPDATE: Time in seconds between DB writes of VM
# monitoring information. -1 to disable DB updating and 0 to write every update
# MONITORING_THREADS: Max. number of threads used to process monitor messages
#
# DS_MONITOR_VM_DISK: Number of MONIROTING_INTERVAL_DATASTORE intervals to monitor
# VM disks. 0 to disable. Only applies to fs and fs_lvm datastores
@ -65,8 +64,6 @@ MONITORING_INTERVAL_DATASTORE = 300
MONITORING_INTERVAL_MARKET = 600
MONITORING_INTERVAL_DB_UPDATE = 0
MONITORING_THREADS = 50
#DS_MONITOR_VM_DISK = 10
#HOST_PER_INTERVAL = 15
@ -352,11 +349,14 @@ DEFAULT_IMAGE_TYPE = "OS"
#
# arguments : for the monitor daemon
# -c : configuration file (monitord.conf by default)
#
# threads : number of threads used to process messages from monitor daemon
#*******************************************************************************
IM_MAD = [
NAME = "monitord",
EXECUTABLE = "onemonitord",
ARGUMENTS = "-c monitord.conf" ]
ARGUMENTS = "-c monitord.conf",
THREADS = 8 ]
#*******************************************************************************
# Virtualization Driver Configuration

View File

@ -379,6 +379,7 @@ void InformationManager::_vm_state(unique_ptr<Message<OpenNebulaMessages>> msg)
if (rc != 0)
{
NebulaLog::error("InM", string("Error parsing VM_STATE: ") + error_msg);
NebulaLog::error("InM", "Received message was: " + msg->payload());
free(error_msg);

View File

@ -7,7 +7,7 @@ xml_txt = STDIN.read
begin
config = REXML::Document.new(xml_txt).root
sync = config.elements['PROBES_PERIOD/SYNC_STATE_VM'].text.to_s
sync = config.elements['PROBES_PERIOD/SYNC_STATE_VM'].text.to_i
rescue StandardError
sync = 180
end

View File

@ -156,10 +156,10 @@ void HostMonitorManager::update_host(int oid, const std::string &xml)
{
start_host_monitor(host);
}
}
NebulaLog::debug("HMM", "Updated Host " + to_string(host->oid())
+ ", state " + Host::state_to_str(host->state()));
NebulaLog::debug("HMM", "Updated Host " + to_string(host->oid())
+ ", state " + Host::state_to_str(host->state()));
}
}
else
{

View File

@ -351,7 +351,6 @@ void OpenNebulaTemplate::set_conf_default()
# MONITORING_INTERVAL_MARKET
# MONITORING_INTERVAL_DATASTORE
# MONITORING_INTERVAL_DB_UPDATE
# MONITORING_THREADS
# DS_MONITOR_VM_DISK
# HOST_PER_INTERVAL
# VM_PER_INTERVAL
@ -369,7 +368,6 @@ void OpenNebulaTemplate::set_conf_default()
set_conf_single("MONITORING_INTERVAL_MARKET", "600");
set_conf_single("MONITORING_INTERVAL_DATASTORE", "300");
set_conf_single("MONITORING_INTERVAL_DB_UPDATE", "0");
set_conf_single("MONITORING_THREADS", "50");
set_conf_single("DS_MONITOR_VM_DISK", "10");
set_conf_single("HOST_PER_INTERVAL", "15");
set_conf_single("VM_PER_INTERVAL", "5");