spring-actuator

已經實現的各種指標

監控器:

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請求的,監控每個請求的狀況

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章