2012-06-08 Dario Rodriguez <dario.rodriguez@artica.es>

* lib/PandoraFMS/Core.pm: Fixed an error counting 
	unknown agents in groups.

	MERGED FROM 4.0.2



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6458 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
darode 2012-06-08 12:13:26 +00:00
parent e6a9fb0d29
commit 2b07cf6461
2 changed files with 12 additions and 5 deletions

View File

@ -1,3 +1,10 @@
2012-06-08 Dario Rodriguez <dario.rodriguez@artica.es>
* lib/PandoraFMS/Core.pm: Fixed an error counting
unknown agents in groups.
MERGED FROM 4.0.2
2012-05-31 Ramon Novoa <rnovoa@artica.es>
* lib/PandoraFMS/WMIServer.pm: Merged from 4.0 branch. Hide wmic error

View File

@ -2507,11 +2507,11 @@ sub pandora_group_statistics ($$) {
AND tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo AND tagente_modulo.disabled = 0 AND tagente_estado.utimestamp != 0");
$warning = 0 unless defined ($warning);
$unknown = get_db_value ($dbh, "SELECT COUNT(tagente_estado.id_agente_estado)
FROM tagente_estado, tagente, tagente_modulo
WHERE tagente.id_grupo = $group AND tagente.disabled = 0
AND tagente_estado.id_agente = tagente.id_agente AND tagente_estado.estado = 3
AND tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo AND tagente_modulo.disabled = 0 AND tagente_estado.utimestamp != 0");
$unknown = get_db_value ($dbh, "SELECT COUNT(min_estado) FROM
(SELECT MIN(tagente_estado.estado) as min_estado FROM tagente_estado, tagente, tagente_modulo
WHERE tagente.disabled = 0 AND tagente_estado.utimestamp != 0 AND tagente_modulo.id_agente_modulo = tagente_estado.id_agente_modulo
AND tagente_modulo.disabled = 0 AND tagente_estado.id_agente = tagente.id_agente AND tagente_estado.estado != 0
AND tagente.id_grupo = $group GROUP BY tagente.id_agente HAVING min_estado = 3) AS S1");
$unknown = 0 unless defined ($unknown);
$non_init = get_db_value ($dbh, "SELECT COUNT(tagente_estado.id_agente_estado)