diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php
index 7d54e946cf..5d9c09275a 100755
--- a/pandora_console/include/functions_graph.php
+++ b/pandora_console/include/functions_graph.php
@@ -1512,7 +1512,7 @@ function truncate_negatives(&$element) {
  * @param bool return or echo flag
  * @param bool show_not_init flag
  */
-function graph_agent_status ($id_agent = false, $width = 300, $height = 200, $return = false, $show_not_init = false) {
+function graph_agent_status ($id_agent = false, $width = 300, $height = 200, $return = false, $show_not_init = false, $data_agents=false) {
 	global $config;
 	
 	
@@ -1531,8 +1531,13 @@ function graph_agent_status ($id_agent = false, $width = 300, $height = 200, $re
 	if ($show_not_init) {
 		$fields[] = 'SUM(notinit_count) "Not init"';
 	}
+
+	if ($data_agents == false) {
+		$data = db_get_row_filter('tagente', $filter, $fields);
+	} else {
+		$data = $data_agents;
+	}
 	
-	$data = db_get_row_filter('tagente', $filter, $fields);
 	if (empty($data)) {
 		$data = array();
 	}
diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php
index 5d3259d057..23be23bf01 100644
--- a/pandora_console/include/functions_reporting.php
+++ b/pandora_console/include/functions_reporting.php
@@ -1350,7 +1350,7 @@ function reporting_get_stats_servers($tiny = true) {
 	return $output;
 }
 
-function reporting_get_stats_modules_status($data, $graph_width = 250, $graph_height = 150, $links = false) {
+function reporting_get_stats_modules_status($data, $graph_width = 250, $graph_height = 150, $links = false, $data_agents=false) {
 	global $config;
 	
 	// Link URLS
@@ -1414,14 +1414,14 @@ function reporting_get_stats_modules_status($data, $graph_width = 250, $graph_he
 	$tdata[2] = $tdata[3] = '';
 	$table_mbs->rowclass[] = '';
 	$table_mbs->data[] = $tdata;
-	
+
 	if ($data["monitor_checks"] > 0) {
 		$tdata = array();
 		$table_mbs->colspan[count($table_mbs->data)][0] = 4;
 		$table_mbs->cellstyle[count($table_mbs->data)][0] = 'text-align: center;';
 		$tdata[0] = '<div id="outter_status_pie" style="height: ' . $graph_height . 'px">' .
 			'<div id="status_pie" style="margin: auto; width: ' . $graph_width . 'px;">' .
-				graph_agent_status(false, $graph_width, $graph_height, true, true) .
+				graph_agent_status(false, $graph_width, $graph_height, true, true, $data_agents) .
 			'</div></div>';
 		$table_mbs->rowclass[] = '';
 		$table_mbs->data[] = $tdata;