monitoring: Use sub query count when joining service related tables to the host query

Fixes count problems.

refs #9009
This commit is contained in:
Eric Lippmann 2015-06-05 09:11:10 +02:00
parent f8b49864bb
commit b409609df7
1 changed files with 3 additions and 0 deletions

View File

@ -323,6 +323,7 @@ SQL;
4
);
$this->distinct();
$this->setUseSubqueryCount(true);
}
/**
@ -330,6 +331,7 @@ SQL;
*/
protected function joinServices()
{
$this->requireVirtualTable('hosts');
$this->select->join(
array('s' => $this->prefix . 'services'),
's.host_object_id = h.host_object_id',
@ -347,6 +349,7 @@ SQL;
2
);
$this->distinct();
$this->setUseSubqueryCount(true);
}
/**