mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
server: improve stats collector logs to state what the collector does (#8387)
This simply improves the log statement that prints debug statements during beginning of a stats collector run for hosts or VMs. Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
64ecd00eb7
commit
969e094419
@ -644,13 +644,12 @@ public class StatsCollector extends ManagerBase implements ComponentMethodInterc
|
||||
@Override
|
||||
protected void runInContext() {
|
||||
try {
|
||||
LOGGER.debug("HostStatsCollector is running...");
|
||||
|
||||
SearchCriteria<HostVO> sc = createSearchCriteriaForHostTypeRoutingStateUpAndNotInMaintenance();
|
||||
|
||||
Map<Object, Object> metrics = new HashMap<>();
|
||||
List<HostVO> hosts = _hostDao.search(sc, null);
|
||||
|
||||
LOGGER.debug(String.format("HostStatsCollector is running to process %d UP hosts", hosts.size()));
|
||||
|
||||
Map<Object, Object> metrics = new HashMap<>();
|
||||
for (HostVO host : hosts) {
|
||||
HostStatsEntry hostStatsEntry = (HostStatsEntry) _resourceMgr.getHostStatistics(host.getId());
|
||||
if (hostStatsEntry != null) {
|
||||
@ -1192,13 +1191,12 @@ public class StatsCollector extends ManagerBase implements ComponentMethodInterc
|
||||
@Override
|
||||
protected void runInContext() {
|
||||
try {
|
||||
LOGGER.trace("VmStatsCollector is running...");
|
||||
|
||||
SearchCriteria<HostVO> sc = createSearchCriteriaForHostTypeRoutingStateUpAndNotInMaintenance();
|
||||
List<HostVO> hosts = _hostDao.search(sc, null);
|
||||
|
||||
Map<Object, Object> metrics = new HashMap<>();
|
||||
LOGGER.debug(String.format("VmStatsCollector is running to process VMs across %d UP hosts", hosts.size()));
|
||||
|
||||
Map<Object, Object> metrics = new HashMap<>();
|
||||
for (HostVO host : hosts) {
|
||||
Date timestamp = new Date();
|
||||
Map<Long, VMInstanceVO> vmMap = getVmMapForStatsForHost(host);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user