Commit f5d30c17 authored by Costin Grigoras's avatar Costin Grigoras
Browse files

Tomcat 9.0.52 uses its own Executor by default

parent 8e172e12
......@@ -117,6 +117,17 @@ public class TomcatServer {
values.add(Double.valueOf(tpe.getMaximumPoolSize()));
});
}
else if (executor instanceof org.apache.tomcat.util.threads.ThreadPoolExecutor) {
final org.apache.tomcat.util.threads.ThreadPoolExecutor tpe = (org.apache.tomcat.util.threads.ThreadPoolExecutor) executor;
monitor.addMonitoring("server_status", (names, values) -> {
names.add("active_threads");
values.add(Double.valueOf(tpe.getActiveCount()));
names.add("max_threads");
values.add(Double.valueOf(tpe.getMaximumPoolSize()));
});
}
else
logger.log(Level.SEVERE, "Cannot monitor Tomcat executor of type " + executor.getClass().getCanonicalName());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment