我正在尝试使用嵌入式 tomcat 监控 Spring Boot 2.1.3 中的执行器指标,但这些指标不包括 tomcat.servlet.* 和 tomcat.cache.* 指标。
当前可用的指标如下
{"names":["logback.events","tomcat.sessions.expired","jvm.memory.committed","jvm.buffer.memory.used","jvm.memory.max","jvm.threads .live","jvm.threads.peak","jvm.threads.states","jvm.memory.used","process.uptime","tomcat.global.sent","tomcat.sessions.rejected", "process.cpu.usage","tomcat.global.request.max","jdbc.connections.active","tomcat.global.request","jvm.classes.loaded","jvm.classes.unloaded", "tomcat.sessions.active.current","hikaricp.connections.idle","tomcat.global.received","tomcat.sessions.alive.max","jvm.gc.live.data.size","jdbc .connections.max","jdbc.connections.min","hikaricp.connections.pending","method.timed","http.server.requests","hikaricp.connections","process.files.open","hikaricp.connections.active","hikaricp.connections.creation" ,"tomcat.threads.config.max","tomcat.sessions.active.max","tomcat.global.error","process.start.time","jvm.buffer.count","hikaricp.connections. max","hikaricp.connections.min","tomcat.threads.current","jvm.buffer.total.capacity","process.files.max","jvm.gc.memory.promoted","hikaricp. connections.usage","system.load.average.1m","jvm.gc.max.data.size","gauge.UserController.getUser.executionTime.seconds","hikaricp.connections.timeout","tomcat.线程。忙","system.cpu.count","hikaricp.connections.acquire","jvm.gc.pause","tomcat.sessions.created","jvm.threads.daemon","system.cpu.usage" "jvm.gc.memory.allocated"]}
是否需要在 spring 中设置任何属性,以便公开所有 tomcat 指标。我已经尝试过 managemet.metrics.enable.tomcat=true 但它不起作用。
依赖项是:
<groupId>io.micrometer</groupId>
<artifactId>micrometer-core</artifactId>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>