SpringBoot Actuator配置及指标

一、actuator 配置

二 、actuator 首页

http://localhost:19988/duno/ph/insp/  查看所有链接

{"_links":{"self":{"href":"http://localhost:19988/duno/ph/insp","templated":false},"archaius":{"href":"http://localhost:19988/duno/ph/insp/archaius","templated":false},"beans":{"href":"http://localhost:19988/duno/ph/insp/beans","templated":false},"caches-cache":{"href":"http://localhost:19988/duno/ph/insp/caches/{cache}","templated":true},"caches":{"href":"http://localhost:19988/duno/ph/insp/caches","templated":false},"health-path":{"href":"http://localhost:19988/duno/ph/insp/health/{*path}","templated":true},"health":{"href":"http://localhost:19988/duno/ph/insp/health","templated":false},"info":{"href":"http://localhost:19988/duno/ph/insp/info","templated":false},"conditions":{"href":"http://localhost:19988/duno/ph/insp/conditions","templated":false},"configprops":{"href":"http://localhost:19988/duno/ph/insp/configprops","templated":false},"env":{"href":"http://localhost:19988/duno/ph/insp/env","templated":false},"env-toMatch":{"href":"http://localhost:19988/duno/ph/insp/env/{toMatch}","templated":true},"logfile":{"href":"http://localhost:19988/duno/ph/insp/logfile","templated":false},"loggers-name":{"href":"http://localhost:19988/duno/ph/insp/loggers/{name}","templated":true},"loggers":{"href":"http://localhost:19988/duno/ph/insp/loggers","templated":false},"heapdump":{"href":"http://localhost:19988/duno/ph/insp/heapdump","templated":false},"threaddump":{"href":"http://localhost:19988/duno/ph/insp/threaddump","templated":false},"metrics-requiredMetricName":{"href":"http://localhost:19988/duno/ph/insp/metrics/{requiredMetricName}","templated":true},"metrics":{"href":"http://localhost:19988/duno/ph/insp/metrics","templated":false},"scheduledtasks":{"href":"http://localhost:19988/duno/ph/insp/scheduledtasks","templated":false},"mappings":{"href":"http://localhost:19988/duno/ph/insp/mappings","templated":false},"refresh":{"href":"http://localhost:19988/duno/ph/insp/refresh","templated":false},"features":{"href":"http://localhost:19988/duno/ph/insp/features","templated":false}}}

三、各种指标

http://localhost:19988/duno/ph/insp/metrics/

{"names":["jvm.memory.max","jvm.threads.states","jvm.gc.memory.promoted","jvm.memory.used","jvm.gc.max.data.size","jvm.memory.committed","system.cpu.count","logback.events","jvm.buffer.memory.used","tomcat.sessions.created","jvm.threads.daemon","system.cpu.usage","jvm.gc.memory.allocated","tomcat.sessions.expired","jvm.threads.live","jvm.threads.peak","process.uptime","tomcat.sessions.rejected","process.cpu.usage","jvm.classes.loaded","jvm.gc.pause","jvm.classes.unloaded","tomcat.sessions.active.current","tomcat.sessions.alive.max","jvm.gc.live.data.size","jvm.buffer.count","jvm.buffer.total.capacity","tomcat.sessions.active.max","process.start.time"]}

/metrics/jvm.threads.daemon

{"name":"jvm.threads.daemon","description":"The current number of live daemon threads","baseUnit":"threads","measurements":[{"statistic":"VALUE","value":19.0}],"availableTags":[]}

/metrics/system.cpu.usage

{"name":"system.cpu.usage","description":"The \"recent cpu usage\" for the whole system","baseUnit":null,"measurements":[{"statistic":"VALUE","value":0.06997869445315397}],"availableTags":[]}

/metrics/jvm.memory.max?tag=area:heap

{"name":"jvm.memory.max","description":"The maximum amount of memory in bytes that can be used for memory management","baseUnit":"bytes","measurements":[{"statistic":"VALUE","value":2.075131904E9}],"availableTags":[{"tag":"id","values":["PS Eden Space","PS Survivor Space","PS Old Gen"]}]}

/metrics/jvm.memory.max?tag=area:heap&tag=id:PS%20Survivor%20Space

{"name":"jvm.memory.max","description":"The maximum amount of memory in bytes that can be used for memory management","baseUnit":"bytes","measurements":[{"statistic":"VALUE","value":4.6137344E7}],"availableTags":[]}

http://localhost:19988/duno/ph/insp/health

{"status":"DOWN","components":{"db":{"status":"UP","details":{"database":"MySQL","result":1,"validationQuery":"/* ping */ SELECT 1"}},"discoveryComposite":{"description":"Discovery Client not initialized","status":"UNKNOWN","components":{"discoveryClient":{"description":"Discovery Client not initialized","status":"UNKNOWN"}}},"diskSpace":{"status":"UP","details":{"total":440823443456,"free":342115520512,"threshold":10485760}},"hystrix":{"status":"UP"},"ping":{"status":"UP"},"redis":{"status":"DOWN","details":{"error":"org.springframework.data.redis.RedisConnectionFailureException: Cannot get Jedis connection; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool"}},"refreshScope":{"status":"UP"}}}

http://localhost:19988/duno/ph/insp/heapdump 下载dump文件

http://localhost:19988/duno/ph/insp/threaddump 展示threaddump

http://localhost:19988/duno/ph/insp/scheduledtasks

{"cron":[{"runnable":{"target":"com.yun.ph.insp.domain.task.UrlCorrectTask.execute"},"expression":"0 30 20 * * ?"},{"runnable":{"target":"com.yun.ph.insp.domain.task.AuditMsgTask.execute"},"expression":"0 0 8 * * ?"}],"fixedDelay":[],"fixedRate":[],"custom":[]}

docker配置了4核,实际查看还是32个
http://localhost:19988/duno/ph/ins/metrics/system.cpu.count
{"name":"system.cpu.count","description":"The number of processors available to the Java virtual machine","baseUnit":null,"measurements":[{"statistic":"VALUE","value":32.0}],"availableTags":[]}

 

 

 

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值