The integration of actuator in Springboot makes it easy to manage and monitor the status of your application.
The exposed restful interfaces are:
http Method |
Path |
Description |
Authentication |
GET |
/autoconfig |
View the usage of automatic configuration |
True |
GET |
/configprops |
View configuration properties, including default configuration |
True |
GET |
/beans |
View a list of beans and their relationships |
True |
GET |
/dump |
Print thread stacks |
True |
GET |
/env |
View all environment variables |
True |
GET |
/env/{name} |
View specific variable values |
True |
GET |
/health |
View App Health Metrics |
False |
GET |
/info |
View app Information |
False |
GET |
/mappings |
View all URL mappings |
True |
GET |
/metrics |
View App Basic Metrics |
True |
GET |
/metrics/{name} |
View specific metrics |
True |
POST |
/shutdown |
Close the app |
True |
GET |
/trace |
View basic tracking information |
True |
Many of these requests require authentication to access, since our application is basically exposed to the extranet through Nginx, we can disable authentication interception in the configuration file.
# Disable Actuator Management end authentication Management.security.enabled=false# enable shutdown host:port/ shutdownendpoints.shutdown.enabled=true# disables password authentication endpoints.shutdown.sensitive=false
By accessing Http://IP:port/metrics, you can get similar information like this:
1 {2"Mem": 372386,3"Mem.free": 129077,4"Processors": 4,5"Instance.uptime": 12149,6"Uptime": 20629,7"Systemload.average":-1.0,8"Heap.committed": 302080,9"Heap.init": 129024,Ten"Heap.used": 173002, One"Heap": 1807872, A"Nonheap.committed": 72448, -"Nonheap.init": 2496, -"Nonheap.used": 70307, the"Nonheap": 0, -"Threads.peak": 57, -"Threads.daemon": 53, -"Threads.totalstarted": 64, +"Threads": 55, -"Classes": 9724, +"Classes.loaded": 9724, A"Classes.unloaded": 0, at"Gc.ps_scavenge.count": 11, -"Gc.ps_scavenge.time": 151, -"Gc.ps_marksweep.count": 2, -"Gc.ps_marksweep.time": 242, -"Counter.servo.eurekaserver.replication.batchsize.count": 0, -"Counter.servo.eurekaserver.replication.batchsize.totaltime": 0, in"Gauge.servo.eurekaserver.replication.batchsize.stddev": 0.0, -"Gauge.servo.eurekaserver.replication.batchsize.percentile_50": 0.0, to"Gauge.servo.eurekaserver.replication.batchsize.percentile_95": 0.0, +"Gauge.servo.eurekaserver.replication.batchsize.percentile_99": 0.0, -"Gauge.servo.eurekaserver.replication.batchsize.percentile_99_50": 0.0, the"Counter.servo.eurekaserver.replication.acceptedtasks": 0, *"Counter.servo.eurekaserver.replication.replayedtasks": 0, $"Counter.servo.eurekaserver.replication.expiredtasks": 0,Panax Notoginseng"Counter.servo.eurekaserver.replication.overriddentasks": 0, -"Counter.servo.eurekaserver.replication.queueoverflows": 0, the"Gauge.servo.eurekaserver.replication.acceptorqueuesize": 0, +"Gauge.servo.eurekaserver.replication.pendingjobrequests": 1, A"Gauge.servo.eurekaserver.replication.availablejobs": 0, the"Gauge.servo.eurekaserver.replication.reprocessqueuesize": 0, +"Gauge.servo.eurekaserver.replication.queuesize": 0, -"Counter.servo.count": 0, $"Counter.servo.count-minus-replication": 0, $"Counter.servo.eurekaserver.replication.executiontime.count": 0, -"Counter.servo.eurekaserver.replication.executiontime.totaltime": 0, -"Gauge.servo.eurekaserver.replication.executiontime.stddev": 0.0, the"Gauge.servo.eurekaserver.replication.executiontime.percentile_50": 0.0, -"Gauge.servo.eurekaserver.replication.executiontime.percentile_95": 0.0,Wuyi"Gauge.servo.eurekaserver.replication.executiontime.percentile_99": 0.0, the"Gauge.servo.eurekaserver.replication.executiontime.percentile_99_50": 0.0, -"Counter.servo.eurekaserver.replication.numberofsuccessfulexecutions": 0, Wu"Counter.servo.eurekaserver.replication.numberoftransienterrors": 0, -"Counter.servo.eurekaserver.replication.numberofpermanenterrors": 0, About"Normalized.servo.serialize-all.totaltime": 0.0, $"Normalized.servo.serialize-all.count": 0.0, -"Gauge.servo.serialize-all.min": 0.0, -"Gauge.servo.serialize-all.max": 0.0, -"Normalized.servo.serialize-all-delta.totaltime": 0.0, A"Normalized.servo.serialize-all-delta.count": 0.0, +"Gauge.servo.serialize-all-delta.min": 0.0, the"Gauge.servo.serialize-all-delta.max": 0.0, -"Normalized.servo.serialize-all_remote_region.totaltime": 0.0, $"Normalized.servo.serialize-all_remote_region.count": 0.0, the"Gauge.servo.serialize-all_remote_region.min": 0.0, the"Gauge.servo.serialize-all_remote_region.max": 0.0, the"Normalized.servo.serialize-all-delta_remote_region.totaltime": 0.0, the"Normalized.servo.serialize-all-delta_remote_region.count": 0.0, -"Gauge.servo.serialize-all-delta_remote_region.min": 0.0, in"Gauge.servo.serialize-all-delta_remote_region.max": 0.0, the"Normalized.servo.serialize-one.totaltime": 0.0, the"Normalized.servo.serialize-one.count": 0.0, About"Gauge.servo.serialize-one.min": 0.0, the"Gauge.servo.serialize-one.max": 0.0, the"Normalized.servo.serialize-one-vip.totaltime": 0.0, the"Normalized.servo.serialize-one-vip.count": 0.0, +"Gauge.servo.serialize-one-vip.min": 0.0, -"Gauge.servo.serialize-one-vip.max": 0.0, the"Normalized.servo.compress-payload.totaltime": 0.0,Bayi"Normalized.servo.compress-payload.count": 0.0, the"Gauge.servo.compress-payload.min": 0.0, the"Gauge.servo.compress-payload.max": 0.0, -"Gauge.servo.responsecachesize": 0, -"Counter.servo.discovery-peernodeclient-localhost_reuse": 0, the"Counter.servo.discovery-peernodeclient-localhost_createnew": 0, the"Counter.servo.discovery-peernodeclient-localhost_request": 0, the"Counter.servo.discovery-peernodeclient-localhost_release": 0, the"Counter.servo.discovery-peernodeclient-localhost_delete": 0, -"Normalized.servo.discovery-peernodeclient-localhost_requestconnectiontimer.totaltime": 0.0, the"Normalized.servo.discovery-peernodeclient-localhost_requestconnectiontimer.count": 0.0, the"Gauge.servo.discovery-peernodeclient-localhost_requestconnectiontimer.min": 0.0, the"Gauge.servo.discovery-peernodeclient-localhost_requestconnectiontimer.max": 0.0,94"Normalized.servo.discovery-peernodeclient-localhost_createconnectiontimer.totaltime": 0.0, the"Normalized.servo.discovery-peernodeclient-localhost_createconnectiontimer.count": 0.0, the"Gauge.servo.discovery-peernodeclient-localhost_createconnectiontimer.min": 0.0, the"Gauge.servo.discovery-peernodeclient-localhost_createconnectiontimer.max": 0.0,98"Gauge.servo.connectioncount": 0, About"Gauge.servo.localregistrysize": 0, -"Gauge.servo.numofreplicationsinlastmin": 0,101"Gauge.servo.isbelowrenewthreshold": 0,102"Gauge.servo.numofrenewsinlastmin": 0,103"Gauge.servo.numofrenewsperminthreshold": 1,104"Gauge.servo.numofelementsininstancecache": 0, the"Normalized.servo.eureka-connection-cleaner-time.totaltime": 0.0,106"Normalized.servo.eureka-connection-cleaner-time.count": 0.0,107"Gauge.servo.eureka-connection-cleaner-time.min": 0.0,108"Gauge.servo.eureka-connection-cleaner-time.max": 0.0,109"Counter.servo.eureka-connection-cleaner-failure": 0, the"Httpsessions.max":-1,111"Httpsessions.active": 0 the}
If you only care about some of the parameters you can use: http://IP:port/metrics/mem to see the value of a particular parameter
{"Mem": 373311}
The actuator of Springboot