项目作者: springboxcn

项目描述 :
spring-boot-starter-actuator demo
高级语言: Java
项目地址: git://github.com/springboxcn/springboot-starter-actuator-demo.git


springboot-starter-actuator-demo

spring-boot-starter-actuator demo

http://www.baeldung.com/spring-boot-actuators#boot-2x-actuator

  1. management.endpoints.web.exposure.include=*

访问 /actuator

  1. {
  2. "_links": {
  3. "self": {
  4. "href": "http://localhost:8080/actuator",
  5. "templated": false
  6. },
  7. "auditevents": {
  8. "href": "http://localhost:8080/actuator/auditevents",
  9. "templated": false
  10. },
  11. "beans": {
  12. "href": "http://localhost:8080/actuator/beans",
  13. "templated": false
  14. },
  15. "health": {
  16. "href": "http://localhost:8080/actuator/health",
  17. "templated": false
  18. },
  19. "conditions": {
  20. "href": "http://localhost:8080/actuator/conditions",
  21. "templated": false
  22. },
  23. "configprops": {
  24. "href": "http://localhost:8080/actuator/configprops",
  25. "templated": false
  26. },
  27. "env": {
  28. "href": "http://localhost:8080/actuator/env",
  29. "templated": false
  30. },
  31. "env-toMatch": {
  32. "href": "http://localhost:8080/actuator/env/{toMatch}",
  33. "templated": true
  34. },
  35. "info": {
  36. "href": "http://localhost:8080/actuator/info",
  37. "templated": false
  38. },
  39. "loggers": {
  40. "href": "http://localhost:8080/actuator/loggers",
  41. "templated": false
  42. },
  43. "loggers-name": {
  44. "href": "http://localhost:8080/actuator/loggers/{name}",
  45. "templated": true
  46. },
  47. "heapdump": {
  48. "href": "http://localhost:8080/actuator/heapdump",
  49. "templated": false
  50. },
  51. "threaddump": {
  52. "href": "http://localhost:8080/actuator/threaddump",
  53. "templated": false
  54. },
  55. "metrics": {
  56. "href": "http://localhost:8080/actuator/metrics",
  57. "templated": false
  58. },
  59. "metrics-requiredMetricName": {
  60. "href": "http://localhost:8080/actuator/metrics/{requiredMetricName}",
  61. "templated": true
  62. },
  63. "scheduledtasks": {
  64. "href": "http://localhost:8080/actuator/scheduledtasks",
  65. "templated": false
  66. },
  67. "httptrace": {
  68. "href": "http://localhost:8080/actuator/httptrace",
  69. "templated": false
  70. },
  71. "mappings": {
  72. "href": "http://localhost:8080/actuator/mappings",
  73. "templated": false
  74. }
  75. }
  76. }

访问 /actuator/metrics

  1. {
  2. "names": [
  3. "jvm.memory.max",
  4. "jvm.gc.memory.promoted",
  5. "tomcat.cache.hit",
  6. "tomcat.cache.access",
  7. "jvm.memory.used",
  8. "jvm.gc.max.data.size",
  9. "jvm.gc.pause",
  10. "jvm.memory.committed",
  11. "http.server.requests",
  12. "system.cpu.count",
  13. "logback.events",
  14. "tomcat.global.sent",
  15. "jvm.buffer.memory.used",
  16. "tomcat.sessions.created",
  17. "jvm.threads.daemon",
  18. "system.cpu.usage",
  19. "jvm.gc.memory.allocated",
  20. "tomcat.global.request.max",
  21. "tomcat.global.request",
  22. "tomcat.sessions.expired",
  23. "jvm.threads.live",
  24. "jvm.threads.peak",
  25. "tomcat.global.received",
  26. "process.uptime",
  27. "tomcat.sessions.rejected",
  28. "process.cpu.usage",
  29. "tomcat.threads.config.max",
  30. "jvm.classes.loaded",
  31. "jvm.classes.unloaded",
  32. "tomcat.global.error",
  33. "tomcat.sessions.active.current",
  34. "tomcat.sessions.alive.max",
  35. "jvm.gc.live.data.size",
  36. "tomcat.servlet.request.max",
  37. "tomcat.threads.current",
  38. "tomcat.servlet.request",
  39. "jvm.buffer.count",
  40. "jvm.buffer.total.capacity",
  41. "tomcat.sessions.active.max",
  42. "tomcat.threads.busy",
  43. "process.start.time",
  44. "tomcat.servlet.error"
  45. ]
  46. }