2012-11-15 Ramon Novoa <rnovoa@artica.es>
* util/pandora_db.pl: Try to update module status count for all agents. Further performance tests need to be done. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7149 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
c13a86afe8
commit
42ad30cf11
|
@ -1,3 +1,8 @@
|
|||
2012-11-15 Ramon Novoa <rnovoa@artica.es>
|
||||
|
||||
* util/pandora_db.pl: Try to update module status count for all agents.
|
||||
Further performance tests need to be done.
|
||||
|
||||
2012-11-14 Ramon Novoa <rnovoa@artica.es>
|
||||
|
||||
* lib/PandoraFMS/Core.pm,
|
||||
|
|
|
@ -533,7 +533,9 @@ sub pandora_checkdb_consistency {
|
|||
}
|
||||
|
||||
print "[CHECKDB] Checking module status count... \n";
|
||||
my @agents = get_db_rows ($dbh, 'SELECT id_agente FROM tagente WHERE normal_count+warning_count+critical_count+unknown_count+notinit_count<>total_count');
|
||||
#my @agents = get_db_rows ($dbh, 'SELECT id_agente FROM tagente WHERE normal_count+warning_count+critical_count+unknown_count+notinit_count<>total_count');
|
||||
# Try to update module status count for all agents. Further performance tests need to be done.
|
||||
my @agents = get_db_rows ($dbh, 'SELECT id_agente FROM tagente');
|
||||
foreach my $agent (@agents) {
|
||||
my $id_agente = $agent->{'id_agente'};
|
||||
db_do ($dbh, 'UPDATE tagente SET normal_count=(SELECT COUNT(*) FROM tagente_estado WHERE id_agente=' . $id_agente . ' AND estado=0 AND utimestamp<>0),
|
||||
|
|
Loading…
Reference in New Issue