Added thresholds to comb/interface graphs
This commit is contained in:
parent
367a1e121f
commit
6142fa1b05
|
@ -1704,12 +1704,14 @@ function graphic_combined_module (
|
|||
|
||||
if ($do_it_warning_min && $do_it_warning_max && $do_it_warning_inverse) {
|
||||
$yellow_threshold = $compare_warning;
|
||||
$threshold_data['yellow_threshold'] = $compare_warning;
|
||||
$threshold_data['yellow_up'] = $yellow_up;
|
||||
$threshold_data['yellow_inverse'] = (bool)$yellow_inverse;
|
||||
}
|
||||
|
||||
if ($do_it_critical_min && $do_it_critical_max && $do_it_critical_inverse) {
|
||||
$red_threshold = $compare_critical;
|
||||
$threshold_data['red_threshold'] = $compare_critical;
|
||||
$threshold_data['red_up'] = $red_up;
|
||||
$threshold_data['red_inverse'] = (bool)$red_inverse;
|
||||
}
|
||||
|
|
|
@ -141,11 +141,22 @@ function flot_area_graph (
|
|||
}
|
||||
if(isset($params['graph_combined']) && $params['graph_combined'] &&
|
||||
(!isset($params['from_interface']) || !$params['from_interface']) ){
|
||||
if( isset($params['threshold_data']) && is_array($params['threshold_data'])){
|
||||
$yellow_threshold = $params['threshold_data']['yellow_threshold'];
|
||||
$red_threshold = $params['threshold_data']['red_threshold'];
|
||||
$yellow_up = $params['threshold_data']['yellow_up'];
|
||||
$red_up = $params['threshold_data']['red_up'];
|
||||
$yellow_inverse = $params['threshold_data']['yellow_inverse'];
|
||||
$red_inverse = $params['threshold_data']['red_inverse'];
|
||||
}
|
||||
else{
|
||||
$yellow_up = 0;
|
||||
$red_up = 0;
|
||||
$yellow_inverse = false;
|
||||
$red_inverse = false;
|
||||
}
|
||||
|
||||
}
|
||||
elseif(!isset($params['combined']) || !$params['combined']){
|
||||
$yellow_threshold = $data_module_graph['w_min'];
|
||||
$red_threshold = $data_module_graph['c_min'];
|
||||
|
@ -164,6 +175,8 @@ function flot_area_graph (
|
|||
}
|
||||
elseif(isset($params['from_interface']) && $params['from_interface']){
|
||||
if( isset($params['threshold_data']) && is_array($params['threshold_data'])){
|
||||
$yellow_threshold = $params['threshold_data']['yellow_threshold'];
|
||||
$red_threshold = $params['threshold_data']['red_threshold'];
|
||||
$yellow_up = $params['threshold_data']['yellow_up'];
|
||||
$red_up = $params['threshold_data']['red_up'];
|
||||
$yellow_inverse = $params['threshold_data']['yellow_inverse'];
|
||||
|
|
Loading…
Reference in New Issue