Adjust ELASTICSEARCH monitoring enumeration name

pull/602/head
chen.ma 2 years ago
parent 19df5533c2
commit b44ad1211e

@ -38,7 +38,7 @@ public enum MonitorTypeEnum {
SERVER, SERVER,
/** /**
* ES * ELASTICSEARCH
*/ */
ES ELASTICSEARCH
} }

@ -143,6 +143,6 @@ public class EsMonitorHandler extends AbstractDynamicThreadPoolMonitor {
@Override @Override
public String getType() { public String getType() {
return MonitorTypeEnum.ES.name().toLowerCase(); return MonitorTypeEnum.ELASTICSEARCH.name().toLowerCase();
} }
} }

@ -119,7 +119,7 @@ public class ReportingEventExecutor implements Runnable, CommandLineRunner, Disp
DynamicThreadPoolServiceLoader.getSingletonServiceInstances(DynamicThreadPoolMonitor.class); DynamicThreadPoolServiceLoader.getSingletonServiceInstances(DynamicThreadPoolMonitor.class);
boolean customerDynamicThreadPoolMonitorFlag = CollectionUtil.isNotEmpty(dynamicThreadPoolMonitors) || (collectType.contains(MonitorTypeEnum.PROMETHEUS.name().toLowerCase()) boolean customerDynamicThreadPoolMonitorFlag = CollectionUtil.isNotEmpty(dynamicThreadPoolMonitors) || (collectType.contains(MonitorTypeEnum.PROMETHEUS.name().toLowerCase())
|| collectType.contains(MonitorTypeEnum.LOG.name().toLowerCase()) || collectType.contains(MonitorTypeEnum.LOG.name().toLowerCase())
|| collectType.contains(MonitorTypeEnum.ES.name().toLowerCase())); || collectType.contains(MonitorTypeEnum.ELASTICSEARCH.name().toLowerCase()));
if (customerDynamicThreadPoolMonitorFlag) { if (customerDynamicThreadPoolMonitorFlag) {
// Get all dynamic thread pool monitoring components. // Get all dynamic thread pool monitoring components.
Map<String, ThreadPoolMonitor> threadPoolMonitorMap = ApplicationContextHolder.getBeansOfType(ThreadPoolMonitor.class); Map<String, ThreadPoolMonitor> threadPoolMonitorMap = ApplicationContextHolder.getBeansOfType(ThreadPoolMonitor.class);

Loading…
Cancel
Save