2013-12-01 Junichi Satoh <junichi@rworks.jp>

* include/functions_modules.php: Corrected agent counting by module
	group.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9148 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
jsatoh 2013-12-01 02:17:12 +00:00
parent 12f705d6b6
commit 410fe3d471
2 changed files with 13 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2013-12-01 Junichi Satoh <junichi@rworks.jp>
* include/functions_modules.php: Corrected agent counting by module
group.
2013-11-30 Junichi Satoh <junichi@rworks.jp>
* operation/tree.php, operation/agentes/datos_agente.php,

View File

@ -1655,10 +1655,11 @@ function modules_agents_warning ($module_name) {
function modules_group_agent_unknown ($module_group) {
return db_get_sql ("SELECT COUNT(*)
return db_get_sql ("SELECT COUNT(DISTINCT tagente.id_agente)
FROM tagente, tagente_modulo
WHERE tagente.id_agente=tagente_modulo.id_agente
AND critical_count=0 AND warning_count=0
AND tagente.disabled = 0
AND unknown_count>0 AND id_module_group = $module_group");
}
@ -1666,10 +1667,11 @@ function modules_group_agent_unknown ($module_group) {
function modules_group_agent_ok ($module_group) {
return db_get_sql ("SELECT COUNT(*)
return db_get_sql ("SELECT COUNT(DISTINCT tagente.id_agente)
FROM tagente, tagente_modulo
WHERE tagente.id_agente=tagente_modulo.id_agente
AND normal_count = total_count
AND tagente.disabled = 0
AND id_module_group = $module_group");
}
@ -1677,9 +1679,10 @@ function modules_group_agent_ok ($module_group) {
function modules_group_agent_critical ($module_group) {
return db_get_sql ("SELECT COUNT(*)
return db_get_sql ("SELECT COUNT(DISTINCT tagente.id_agente)
FROM tagente, tagente_modulo
WHERE tagente.id_agente=tagente_modulo.id_agente
AND tagente.disabled = 0
AND critical_count > 0 AND id_module_group = $module_group");
}
@ -1687,10 +1690,11 @@ function modules_group_agent_critical ($module_group) {
function modules_group_agent_warning ($module_group) {
return db_get_sql ("SELECT COUNT(*)
return db_get_sql ("SELECT COUNT(DISTINCT tagente.id_agente)
FROM tagente, tagente_modulo
WHERE tagente.id_agente=tagente_modulo.id_agente
AND critical_count = 0 AND warning_count > 0
AND tagente.disabled = 0
AND id_module_group = $module_group");
}