@@ -392,7 +392,7 @@ class VariableConfig:
392392
393393 self .name = name
394394 try :
395- self .rrd_regex = re .compile (rrd_regex )
395+ self .rrd_regex = re .compile ("^%s$" % rrd_regex )
396396 except :
397397 raise XmlConfigException , "variable %s: regex %s does not compile" % (name , rrd_regex )
398398
@@ -573,7 +573,7 @@ class ObjectMonitor:
573573 params_in_obj_report = obj_report .get_var_names ()
574574 for var in self .variables :
575575 # find the subset of the params returned for this object that we need to consolidate into var
576- params_to_consolidate = filter (var .rrd_regex .search , params_in_obj_report )
576+ params_to_consolidate = filter (var .rrd_regex .match , params_in_obj_report )
577577 for row in range (num_rows ):
578578 # Get the values to consolidate
579579 values_to_consolidate = map (lambda param : obj_report .get_value (param , row ), params_to_consolidate )
@@ -604,7 +604,7 @@ class VMMonitor(ObjectMonitor):
604604 * alarm_trigger_period: num seconds of 'bad' values before an alarm is sent (default '60')
605605 * alarm_auto_inhibit_period: num seconds this alarm disabled after an alarm is sent (default '3600')
606606 * consolidation_fn: how to combine variables from rrd_updates into one value
607- (default is 'average' for 'cpu_usage' & 'sum' for everything else)
607+ (default is 'average' for 'cpu_usage', 'get_percent_fs_usage' for 'fs_usage', & 'sum' for everything else)
608608 * rrd_regex matches the names of variables from (xe vm-data-sources-list uuid=$vmuuid) used to compute value
609609 (only has defaults for "cpu_usage", "network_usage", and "disk_usage")
610610 """
0 commit comments