Fixed the normal and not init agent counters

This commit is contained in:
Alejandro Gallardo Escobar 2015-02-20 13:13:40 +01:00
parent 25d1cb0478
commit 2b8b2d5d7d
2 changed files with 10 additions and 8 deletions

View File

@ -1143,11 +1143,8 @@ function groups_agent_not_init ($group_array) {
$count = db_get_sql ("SELECT COUNT(*)
FROM tagente
WHERE disabled = 0
AND critical_count = 0
AND warning_count = 0
AND unknown_count = 0
AND normal_count = 0
AND (notinit_count > 0 OR total_count = 0)
AND (total_count = 0
OR total_count = notinit_count)
AND id_grupo IN $group_clause");
return $count > 0 ? $count : 0;
@ -1212,8 +1209,10 @@ function groups_agent_ok ($group_array) {
$count = db_get_sql ("SELECT COUNT(*)
FROM tagente
WHERE tagente.disabled = 0
AND critical_count = 0
AND warning_count = 0
AND unknown_count = 0
AND normal_count > 0
AND normal_count = total_count
AND id_grupo IN $group_clause");

View File

@ -92,7 +92,10 @@ function tags_agent_ok ($id_tag) {
AND tagente.disabled=0
AND tagente_modulo.id_agente_modulo = ttag_module.id_agente_modulo
AND ttag_module.id_tag = $id_tag
AND normal_count=total_count");
AND critical_count = 0
AND warning_count = 0
AND unknown_count = 0
AND normal_count > 0");
}
/**