1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-11 05:17:41 +03:00

Feature #1739: Merge oned.conf Host & VM monitoring intervals

This commit is contained in:
Carlos Martín 2013-02-14 15:24:32 +01:00
parent 7e9d1b8035
commit d749af7057
3 changed files with 13 additions and 24 deletions

View File

@ -6,16 +6,14 @@
# Daemon configuration attributes
#-------------------------------------------------------------------------------
# MANAGER_TIMER: Time in seconds the core uses to evaluate periodical functions.
# HOST_MONITORING_INTERVAL and VM_POLLING_INTERVAL can not have smaller values
# than MANAGER_TIMER.
# MONITORING_INTERVAL cannot have a smaller value than MANAGER_TIMER.
#
# MONITORING_INTERVAL: Time in seconds between host and VM monitorization.
#
# HOST_MONITORING_INTERVAL: Time in seconds between host monitorization.
# HOST_PER_INTERVAL: Number of hosts monitored in each interval.
# HOST_MONITORING_EXPIRATION_TIME: Time, in seconds, to expire monitoring
# information. Use 0 to disable HOST monitoring recording.
#
# VM_POLLING_INTERVAL: Time in seconds between virtual machine monitorization.
# Use 0 to disable VM monitoring.
# VM_PER_INTERVAL: Number of VMs monitored in each interval.
# VM_MONITORING_EXPIRATION_TIME: Time, in seconds, to expire monitoring
# information. Use 0 to disable VM monitoring recording.
@ -46,7 +44,6 @@
# VM_SUBMIT_ON_HOLD: Forces VMs to be created on hold state instead of pending.
# Values: YES or NO.
#*******************************************************************************
#
LOG = [
system = "file",
@ -55,11 +52,11 @@ LOG = [
#MANAGER_TIMER = 30
HOST_MONITORING_INTERVAL = 600
MONITORING_INTERVAL = 300
#HOST_PER_INTERVAL = 15
#HOST_MONITORING_EXPIRATION_TIME = 86400
VM_POLLING_INTERVAL = 600
#VM_PER_INTERVAL = 5
#VM_MONITORING_EXPIRATION_TIME = 86400

View File

@ -638,17 +638,19 @@ void Nebula::start()
MadManager::mad_manager_system_init();
time_t timer_period;
time_t monitor_period;
nebula_configuration->get("MANAGER_TIMER", timer_period);
nebula_configuration->get("MONITORING_INTERVAL", monitor_period);
// ---- Virtual Machine Manager ----
try
{
time_t poll_period;
vector<const Attribute *> vmm_mads;
int vm_limit;
time_t poll_period;
nebula_configuration->get("VM_POLLING_INTERVAL", poll_period);
poll_period = monitor_period * 2.5;
nebula_configuration->get("VM_PER_INTERVAL", vm_limit);
@ -695,11 +697,8 @@ void Nebula::start()
try
{
vector<const Attribute *> im_mads;
time_t monitor_period;
int host_limit;
nebula_configuration->get("HOST_MONITORING_INTERVAL", monitor_period);
nebula_configuration->get("HOST_PER_INTERVAL", host_limit);
nebula_configuration->get("IM_MAD", im_mads);

View File

@ -89,10 +89,9 @@ void OpenNebulaTemplate::set_conf_default()
#*******************************************************************************
# Daemon configuration attributes
#-------------------------------------------------------------------------------
# HOST_MONITORING_INTERVAL
# MONITORING_INTERVAL
# HOST_PER_INTERVAL
# HOST_MONITORING_EXPIRATION_TIME
# VM_POLLING_INTERVAL
# VM_PER_INTERVAL
# VM_MONITORING_EXPIRATION_TIME
# PORT
@ -102,10 +101,10 @@ void OpenNebulaTemplate::set_conf_default()
# VM_SUBMIT_ON_HOLD
#*******************************************************************************
*/
// MONITOR_INTERVAL
value = "600";
// MONITORING_INTERVAL
value = "300";
attribute = new SingleAttribute("HOST_MONITORING_INTERVAL",value);
attribute = new SingleAttribute("MONITORING_INTERVAL",value);
conf_default.insert(make_pair(attribute->name(),attribute));
// HOST_PER_INTERVAL
@ -120,12 +119,6 @@ void OpenNebulaTemplate::set_conf_default()
attribute = new SingleAttribute("HOST_MONITORING_EXPIRATION_TIME",value);
conf_default.insert(make_pair(attribute->name(),attribute));
// POLL_INTERVAL
value = "600";
attribute = new SingleAttribute("VM_POLLING_INTERVAL",value);
conf_default.insert(make_pair(attribute->name(),attribute));
// VM_PER_INTERVAL
value = "5";