已经实现的各种指标
监控器:
1、localhost:19667/actuator/health
/health
这个路径主要是用来统计系统的状况,默认里面目前只有系统状况和磁盘状况
{
"status": "UP",
"details": {
"diskSpace": {
"status": "UP",
"details": {
"total": 340185694208,
"free": 311895359488,
"threshold": 10485760
}
},
"redis": {
"status": "UP",
"details": {
"cluster_size": 3,
"slots_up": 16384,
"slots_fail": 0
}
},
"db": {
"status": "UP",
"details": {
"database": "MySQL",
"hello": 1
}
},
"refreshScope": {
"status": "UP"
},
"hystrix": {
"status": "UP"
}
}
}
2、localhost:19667/actuator/metrics
{
"names": [
"jvm.memory.max",
"tomcat.threads.busy",
"jvm.threads.states",
"jvm.gc.memory.promoted",
"http.client.requests",
"jvm.memory.used",
"jvm.gc.max.data.size",
"jvm.gc.pause",
"jvm.memory.committed",
"system.cpu.count",
"logback.events",
"http.server.requests",
"jvm.buffer.memory.used",
"tomcat.sessions.created",
"jvm.threads.daemon",
"system.cpu.usage",
"jvm.gc.memory.allocated",
"tomcat.global.sent",
"tomcat.sessions.expired",
"tomcat.global.request.max",
"jvm.threads.live",
"jvm.threads.peak",
"tomcat.global.request",
"process.uptime",
"tomcat.sessions.rejected",
"tomcat.global.received",
"process.cpu.usage",
"jvm.classes.loaded",
"jvm.classes.unloaded",
"tomcat.sessions.active.current",
"tomcat.threads.config.max",
"tomcat.sessions.alive.max",
"jvm.gc.live.data.size",
"tomcat.global.error",
"jvm.buffer.count",
"tomcat.threads.current",
"jvm.buffer.total.capacity",
"tomcat.sessions.active.max",
"process.start.time"
]
}
3、localhost:19667/actuator/info
{
"git": {
"commit": {
"time": "2020-06-22T07:30:27Z",
"id": "3913f50"
},
"branch": "br_dc-platporm_web_2.2.2"
}
}
4、localhost:19667/actuator/beans
/beans
可以查看到目前Spring里面加载的所有bean,在生产中感觉没有什么用处,可能在开发中会有一些帮助,方便查看bean是否被扫描
5、localhost:19667/actuator/mappings
/mappings
/mappings
里面包含了Controller的所有mapping信息,开发中新手经常会遇到访问不到controller的情况,可以根据这个查看是否被扫描
6、
/trace
/trace
trace目前主要是监控http请求的,监控每个请求的状况