@Override public Map<String, Object> getFields(Object o) throws OpenDataException { HealthStatus event = (HealthStatus) o; Map<String, Object> rc = super.getFields(o); rc.put("healthId", event.getHealthId()); rc.put("level", event.getLevel()); rc.put("message", event.getMessage()); rc.put("resource", event.getResource()); return rc; } }
ObjectName key = entry.getKey(); String message = "Queue " + queue.getName() + " has no consumers"; answer.add(new HealthStatus("org.apache.activemq.noConsumer", "WARNING", message, key.toString())); int val = (int) ((storeSize * 100) / storeLimit); if (val > 90) { answer.add(new HealthStatus("org.apache.activemq.StoreLimit", "WARNING", "Message Store size is within " + val + "% of its limit", adapter.toString())); String message = "Store limit is " + storeLimit / (1024 * 1024) + " mb, whilst the data directory: " + dir.getAbsolutePath() + " only has " + dirFreeSpace / (1024 * 1024) + " mb of usable space"; answer.add(new HealthStatus("org.apache.activemq.FreeDiskSpaceLeft", "WARNING", message, adapter.toString())); int val = (int) ((storeSize * 100) / storeLimit); if (val > 90) { answer.add(new HealthStatus("org.apache.activemq.TempStoreLimit", "WARNING", "TempMessage Store size is within " + val + "% of its limit", adapter.toString())); int val = (int) ((storeSize * 100) / storeLimit); if (val > 90) { answer.add(new HealthStatus("org.apache.activemq.JobSchedulerLimit", "WARNING", "JobSchedulerMessage Store size is within " + val + "% of its limit", scheduler.toString())); String message = "JobSchedulerStore limit is " + storeLimit / (1024 * 1024) + " mb, whilst the data directory: " + dir.getAbsolutePath() + " only has " + dirFreeSpace / (1024 * 1024) + " mb of usable space"; answer.add(new HealthStatus("org.apache.activemq.FreeDiskSpaceLeft", "WARNING", message, scheduler.toString()));
List<HealthStatus> healthStatusList = (List<HealthStatus>) healthListObject; for (HealthStatus healthStatus : healthStatusList) { String healthLevel = healthStatus.getLevel(); switch (healthLevel) { case "WARNING":
@Override public Map<String, Object> getFields(Object o) throws OpenDataException { HealthStatus event = (HealthStatus) o; Map<String, Object> rc = super.getFields(o); rc.put("healthId", event.getHealthId()); rc.put("level", event.getLevel()); rc.put("message", event.getMessage()); rc.put("resource", event.getResource()); return rc; } }
ObjectName key = entry.getKey(); String message = "Queue " + queue.getName() + " has no consumers"; answer.add(new HealthStatus("org.apache.activemq.noConsumer", "WARNING", message, key.toString())); int val = (int) ((storeSize * 100) / storeLimit); if (val > 90) { answer.add(new HealthStatus("org.apache.activemq.StoreLimit", "WARNING", "Message Store size is within " + val + "% of its limit", adapter.toString())); String message = "Store limit is " + storeLimit / (1024 * 1024) + " mb, whilst the data directory: " + dir.getAbsolutePath() + " only has " + dirFreeSpace / (1024 * 1024) + " mb of usable space"; answer.add(new HealthStatus("org.apache.activemq.FreeDiskSpaceLeft", "WARNING", message, adapter.toString())); int val = (int) ((storeSize * 100) / storeLimit); if (val > 90) { answer.add(new HealthStatus("org.apache.activemq.TempStoreLimit", "WARNING", "TempMessage Store size is within " + val + "% of its limit", adapter.toString())); int val = (int) ((storeSize * 100) / storeLimit); if (val > 90) { answer.add(new HealthStatus("org.apache.activemq.JobSchedulerLimit", "WARNING", "JobSchedulerMessage Store size is within " + val + "% of its limit", scheduler.toString())); String message = "JobSchedulerStore limit is " + storeLimit / (1024 * 1024) + " mb, whilst the data directory: " + dir.getAbsolutePath() + " only has " + dirFreeSpace / (1024 * 1024) + " mb of usable space"; answer.add(new HealthStatus("org.apache.activemq.FreeDiskSpaceLeft", "WARNING", message, scheduler.toString()));
@Override public Map<String, Object> getFields(Object o) throws OpenDataException { HealthStatus event = (HealthStatus) o; Map<String, Object> rc = super.getFields(o); rc.put("healthId", event.getHealthId()); rc.put("level", event.getLevel()); rc.put("message", event.getMessage()); rc.put("resource", event.getResource()); return rc; } }
ObjectName key = entry.getKey(); String message = "Queue " + queue.getName() + " has no consumers"; answer.add(new HealthStatus("org.apache.activemq.noConsumer", "WARNING", message, key.toString())); int val = (int) ((storeSize * 100) / storeLimit); if (val > 90) { answer.add(new HealthStatus("org.apache.activemq.StoreLimit", "WARNING", "Message Store size is within " + val + "% of its limit", adapter.toString())); String message = "Store limit is " + storeLimit / (1024 * 1024) + " mb, whilst the data directory: " + dir.getAbsolutePath() + " only has " + dirFreeSpace / (1024 * 1024) + " mb of usable space"; answer.add(new HealthStatus("org.apache.activemq.FreeDiskSpaceLeft", "WARNING", message, adapter.toString())); int val = (int) ((storeSize * 100) / storeLimit); if (val > 90) { answer.add(new HealthStatus("org.apache.activemq.TempStoreLimit", "WARNING", "TempMessage Store size is within " + val + "% of its limit", adapter.toString())); int val = (int) ((storeSize * 100) / storeLimit); if (val > 90) { answer.add(new HealthStatus("org.apache.activemq.JobSchedulerLimit", "WARNING", "JobSchedulerMessage Store size is within " + val + "% of its limit", scheduler.toString())); String message = "JobSchedulerStore limit is " + storeLimit / (1024 * 1024) + " mb, whilst the data directory: " + dir.getAbsolutePath() + " only has " + dirFreeSpace / (1024 * 1024) + " mb of usable space"; answer.add(new HealthStatus("org.apache.activemq.FreeDiskSpaceLeft", "WARNING", message, scheduler.toString()));
@Override public Map<String, Object> getFields(Object o) throws OpenDataException { HealthStatus event = (HealthStatus) o; Map<String, Object> rc = super.getFields(o); rc.put("healthId", event.getHealthId()); rc.put("level", event.getLevel()); rc.put("message", event.getMessage()); rc.put("resource", event.getResource()); return rc; } }
ObjectName key = entry.getKey(); String message = "Queue " + queue.getName() + " has no consumers"; answer.add(new HealthStatus("org.apache.activemq.noConsumer", "WARNING", message, key.toString())); int val = (int) ((storeSize * 100) / storeLimit); if (val > 90) { answer.add(new HealthStatus("org.apache.activemq.StoreLimit", "WARNING", "Message Store size is within " + val + "% of its limit", adapter.toString())); String message = "Store limit is " + storeLimit / (1024 * 1024) + " mb, whilst the data directory: " + dir.getAbsolutePath() + " only has " + dirFreeSpace / (1024 * 1024) + " mb of usable space"; answer.add(new HealthStatus("org.apache.activemq.FreeDiskSpaceLeft", "WARNING", message, adapter.toString())); int val = (int) ((storeSize * 100) / storeLimit); if (val > 90) { answer.add(new HealthStatus("org.apache.activemq.TempStoreLimit", "WARNING", "TempMessage Store size is within " + val + "% of its limit", adapter.toString())); int val = (int) ((storeSize * 100) / storeLimit); if (val > 90) { answer.add(new HealthStatus("org.apache.activemq.JobSchedulerLimit", "WARNING", "JobSchedulerMessage Store size is within " + val + "% of its limit", scheduler.toString())); String message = "JobSchedulerStore limit is " + storeLimit / (1024 * 1024) + " mb, whilst the data directory: " + dir.getAbsolutePath() + " only has " + dirFreeSpace / (1024 * 1024) + " mb of usable space"; answer.add(new HealthStatus("org.apache.activemq.FreeDiskSpaceLeft", "WARNING", message, scheduler.toString()));