diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index e89b7e9909..0b7e1d99e1 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,8 @@ +2013-03-11 Ramon Novoa + + * util/pandora_xml_stress.pl: Added support for critical and warning + thresholds. + 2013-03-07 Miguel de Dios * lib/PandoraFMS/Core.pm: added in the start or end of downtimes diff --git a/pandora_server/util/pandora_xml_stress.pl b/pandora_server/util/pandora_xml_stress.pl index 7954a4d89f..6cd3bfd3a6 100755 --- a/pandora_server/util/pandora_xml_stress.pl +++ b/pandora_server/util/pandora_xml_stress.pl @@ -170,11 +170,29 @@ sub generate_xml_files ($$$$$$) { my $module_time_offset = get_generation_parameter($module, 'time_offset', '0'); my $module_src = get_generation_parameter($module, 'src', 'source.txt'); + my $module_min_critical = get_conf_token ($module, 'module_min_critical', ''); + my $module_max_critical = get_conf_token ($module, 'module_max_critical', ''); + my $module_min_warning = get_conf_token ($module, 'module_min_warning', ''); + my $module_max_warning = get_conf_token ($module, 'module_max_warning', ''); + # Generate module data $xml_data .= "\t\n"; $xml_data .= "\t\t$module_name\n"; $xml_data .= "\t\t$module_description\n"; $xml_data .= "\t\t$module_type\n"; + + if ($module_min_critical ne '') { + $xml_data .= "\t\t$module_min_critical\n"; + } + if ($module_max_critical ne '') { + $xml_data .= "\t\t$module_max_critical\n"; + } + if ($module_min_warning ne '') { + $xml_data .= "\t\t$module_min_warning\n"; + } + if ($module_max_warning ne '') { + $xml_data .= "\t\t$module_max_warning\n"; + } $xml_data .= "\t\t\n"; # Generate data