[SLA] Fixed availability graphs and SLA calculation
This commit is contained in:
parent
38ea279b96
commit
075a89a8b7
|
@ -5333,7 +5333,6 @@ function reporting_advanced_sla ($id_agent_module, $time_from = null, $time_to =
|
|||
// Add downtime interval as OK in inclusion mode
|
||||
$total_checks++;
|
||||
$ok_checks++;
|
||||
$time_in_ok += $wt_check["downtime_interval"];
|
||||
$time_total += $wt_check["downtime_interval"];
|
||||
$time_in_down += $wt_check["downtime_interval"];
|
||||
}
|
||||
|
@ -5500,8 +5499,7 @@ function reporting_availability($report, $content, $date=false, $time=false) {
|
|||
$row = array();
|
||||
|
||||
$text = "";
|
||||
|
||||
// FIXME: Bad data
|
||||
|
||||
$row['data'] = reporting_advanced_sla(
|
||||
$item['id_agent_module'],
|
||||
$report["datetime"] - $content['period'],
|
||||
|
|
|
@ -2427,7 +2427,7 @@ function reporting_html_availability(&$table, $item) {
|
|||
else
|
||||
$table_row[] = '--';
|
||||
|
||||
$table_row[] = '<span style="font-size: 1.2em; font-weight:bold;">' . sla_truncate($row['SLA'], $config['graph_precision']). '%</span>';
|
||||
$table_row[] = '<span style="font-size: 1.2em; font-weight:bold;">' . sla_truncate($row['SLA'] * 100, $config['graph_precision']). '%</span>';
|
||||
|
||||
$table_row2 = array();
|
||||
$table_row2[] = $row['agent'];
|
||||
|
@ -2473,7 +2473,7 @@ function reporting_html_availability(&$table, $item) {
|
|||
else
|
||||
$table_row[] = '--';
|
||||
|
||||
$table_row[] = '<span style="font-size: 1.2em; font-weight:bold;">' . sla_truncate($row['SLA'], $config['graph_precision']). '%</span>';
|
||||
$table_row[] = '<span style="font-size: 1.2em; font-weight:bold;">' . sla_truncate($row['SLA'] * 100, $config['graph_precision']). '%</span>';
|
||||
|
||||
$table_row2 = array();
|
||||
$table_row2[] = $row['agent'];
|
||||
|
|
Loading…
Reference in New Issue