Fixed the 'monitor_report' item in metaconsole reports. TICKET: #2249

This commit is contained in:
mdtrooper 2015-05-22 18:02:41 +02:00
parent 29743cfa74
commit d2b094061a
1 changed files with 12 additions and 0 deletions

View File

@ -2785,6 +2785,14 @@ function reporting_monitor_report($report, $content) {
$return["description"] = $content["description"];
$return["date"] = reporting_get_date_text($report, $content);
if ($config['metaconsole']) {
$id_meta = metaconsole_get_id_server($content["server_name"]);
$server = metaconsole_get_connection_by_id ($id_meta);
metaconsole_connect($server);
}
$value = reporting_get_agentmodule_sla(
$content['id_agent_module'],
$content['period'],
@ -2805,6 +2813,10 @@ function reporting_monitor_report($report, $content) {
$return["data"]["fail"]["formated_value"] = (100 - $return["data"]["ok"]["formated_value"]);
}
if ($config['metaconsole']) {
metaconsole_restore_db();
}
return reporting_check_structure_content($return);
}