At first, I use Spring Boot Actuator and Micrometer. But It does not show tomcat thread utilization. So I configured the application.yml like this.
server:
port: 3200
address: 0.0.0.0
tomcat:
max-threads: 4000
mbeanregistry:
enabled: true
I set server.tomcat.mbeanregistry.enabled
to true. Then Tomcat threads utilization is shown in /actuator/metrics.
This is my output.
{
"names": [
"http.server.requests",
"http.server.requests.histogram",
"jvm.buffer.count",
"jvm.buffer.memory.used",
"jvm.buffer.total.capacity",
"jvm.classes.loaded",
"jvm.classes.unloaded",
"jvm.gc.live.data.size",
"jvm.gc.max.data.size",
"jvm.gc.memory.allocated",
"jvm.gc.memory.promoted",
"jvm.gc.pause",
"jvm.memory.committed",
"jvm.memory.max",
"jvm.memory.used",
"jvm.threads.daemon",
"jvm.threads.live",
"jvm.threads.peak",
"jvm.threads.states",
"logback.events",
"process.cpu.usage",
"process.files.max",
"process.files.open",
"process.start.time",
"process.uptime",
"system.cpu.count",
"system.cpu.usage",
"system.load.average.1m",
"thread.pool.core.size",
"thread.pool.max.size",
"thread.pool.pool.size",
"thread.pool.thread.count",
"tomcat.cache.access",
"tomcat.cache.hit",
"tomcat.global.error",
"tomcat.global.received",
"tomcat.global.request",
"tomcat.global.request.max",
"tomcat.global.sent",
"tomcat.servlet.error",
"tomcat.servlet.request",
"tomcat.servlet.request.max",
"tomcat.sessions.active.current",
"tomcat.sessions.active.max",
"tomcat.sessions.alive.max",
"tomcat.sessions.created",
"tomcat.sessions.expired",
"tomcat.sessions.rejected",
"tomcat.threads.busy",
"tomcat.threads.config.max",
"tomcat.threads.current"
]
}