Fixed problems with count agents, the agents with state is 'not init' count as normal state
This commit is contained in:
parent
122302cb59
commit
6b5ab72c05
|
@ -1212,6 +1212,7 @@ function groups_agent_ok ($group_array) {
|
|||
$count = db_get_sql ("SELECT COUNT(*)
|
||||
FROM tagente
|
||||
WHERE tagente.disabled = 0
|
||||
AND normal_count > 0
|
||||
AND normal_count = total_count
|
||||
AND id_grupo IN $group_clause");
|
||||
|
||||
|
|
|
@ -505,6 +505,7 @@ function treeview_printTree($type) {
|
|||
else {
|
||||
$list[$server_item['_name_']]['_num_ok_'] += $server_item['_num_ok_'];
|
||||
$list[$server_item['_name_']]['_num_critical_'] += $server_item['_num_critical_'];
|
||||
$list[$server_item['_name_']]['_num_not_init_'] += $server_item['_num_not_init_'];
|
||||
$list[$server_item['_name_']]['_num_warning_'] += $server_item['_num_warning_'];
|
||||
$list[$server_item['_name_']]['_num_unknown_'] += $server_item['_num_unknown_'];
|
||||
}
|
||||
|
@ -567,6 +568,7 @@ function treeview_printTree($type) {
|
|||
'total_count' => $item['_num_total_'],
|
||||
'normal_count' => $item['_num_ok_'],
|
||||
'critical_count' => $item['_num_critical_'],
|
||||
'not_init_count' => $item['_num_not_init_'],
|
||||
'warning_count' => $item['_num_warning_'],
|
||||
'unknown_count' => $item['_num_unknown_']);
|
||||
|
||||
|
|
Loading…
Reference in New Issue