Spring-boot-starter-actuator Simple to use

Source: Internet
Author: User

Single app use

POM

        <Dependency>            <groupId>Org.springframework.boot</groupId>            <Artifactid>Spring-boot-starter-actuator</Artifactid>            <version>1.5.6.RELEASE</version>        </Dependency>

Application.yml This opens the Springsecurity protection, general application, we use form as a user login, if we need to monitor the program, then we will need a business unrelated to the application of the account. You can set an account role for admin, whatever, You can use Httpbasic to verify

#开启shutdown的安全验证management:  security:    enabled:true    roles:user#  port:8060#  Address: 127.0.0.1 Health  :    Mail:      enabled:false# allow shutdown request endpoints:  shutdown:    enabled:false

Httpbasic authentication, the password must be BASIC64 encoded, which is encoded, not encrypted

Request with the request header, return a large string of data

{    "Mem": 1289755,    "Mem.free": 954940,    "Processors": 4,    "Instance.uptime": 268073,    "Uptime": 286927,    "Systemload.average":-1,    "Heap.committed": 1188352,    "Heap.init": 391168,    "Heap.used": 233411,    "Heap": 5563392,    "Nonheap.committed": 103808,    "Nonheap.init": 2496,    "Nonheap.used": 101404,    "Nonheap": 0,    "Threads.peak": 64,    "Threads.daemon": 45,    "Threads.totalstarted": 151,    "Threads": 49,    "Classes": 13708,    "Classes.loaded": 13750,    "Classes.unloaded": 42,    "Gc.ps_scavenge.count": 17,    "Gc.ps_scavenge.time": 331,    "Gc.ps_marksweep.count": 3,    "Gc.ps_marksweep.time": 371,    "Counter.servo.eurekaclient.transport.request": 0,    "gauge.servo.eurekaclient.registration.lastheartbeatsec_00015": 0,    "gauge.servo.eurekaclient.registration.lastheartbeatsec_00030": 0,    "Normalized.servo.rest.totaltime": 1.6546110833333332,    "Normalized.servo.rest.count": 0.016666666666666666,    "Gauge.servo.rest.min": 99.276665,    "Gauge.servo.rest.max": 99.276665,    "Counter.servo.timeouts": 0,    "Counter.servo.rejectedexecutions": 0,    "Counter.servo.throwables": 0,    "Gauge.servo.threadpoolused": 0,    "gauge.servo.eurekaclient.registry.lastupdatesec_00240": 0,    "Normalized.servo.eurekaclient.transport.latency.totaltime": 0,    "Normalized.servo.eurekaclient.transport.latency.count": 0,    "Gauge.servo.eurekaclient.transport.latency.min": 0,    "Gauge.servo.eurekaclient.transport.latency.max": 0,    "gauge.servo.eurekaclient.registration.lastheartbeatsec_00480": 0,    "Gauge.servo.eurekaclient.transport.currentsessionduration": 261187,    "Gauge.servo.response.index": 158,    "gauge.servo.eurekaclient.registry.lastupdatesec_00060": 0,    "Counter.servo.discoveryclient_reconcilehashcodemismatch": 0,    "Normalized.servo.discoveryclient_fetchregistry.totaltime": 0.42151759999999994,    "Normalized.servo.discoveryclient_fetchregistry.count": 0.03333333333333333,    "Gauge.servo.discoveryclient_fetchregistry.min": 9.916665,    "Gauge.servo.discoveryclient_fetchregistry.max": 15.374391,    "Counter.servo.discoveryclient_reregister": 0,    "Gauge.servo.eurekaclient.registration.lastsuccessfulheartbeattimeperiod": 471,    "Gauge.servo.eurekaclient.registry.lastsuccessfulregistryfetchtimeperiod": 20672,    "Gauge.servo.eurekaclient.registry.localregistrysize": 1,    "Gauge.servo.response.loginsuccess": 102,    "Gauge.servo.eurekaclient.resolver.lastloadtimestamp": 0,    "Gauge.servo.eurekaclient.resolver.endpointssize": 1,    "Counter.servo.eurekaclient.transport.connectionerrors": 0,    "Gauge.servo.response.dump": 387,    "Gauge.servo.response.mappings": 25,    "gauge.servo.eurekaclient.registration.lastheartbeatsec_00120": 0,    "Gauge.servo.response.images.kaptcha.jpg": 22,    "Gauge.servo.response.invoice.invoiceinfo.tolist": 146,    "Gauge.servo.response.star-star": 24,    "gauge.servo.eurekaclient.registration.lastheartbeatsec_00060": 0,    "gauge.servo.eurekaclient.registration.lastheartbeatsec_00240": 0,    "Gauge.servo.response.root": 365,    "Gauge.servo.response.health": 1037,    "Gauge.servo.response.getloginerror": 25,    "gauge.servo.eurekaclient.registry.lastupdatesec_00480": 0,    "Counter.servo.discoveryclient-httpclient_reuse": 27,    "Counter.servo.discoveryclient-httpclient_createnew": 9,    "Counter.servo.discoveryclient-httpclient_request": 36,    "Counter.servo.discoveryclient-httpclient_release": 36,    "Counter.servo.discoveryclient-httpclient_delete": 8,    "Normalized.servo.discoveryclient-httpclient_requestconnectiontimer.totaltime": 0.0035334999999999997,    "Normalized.servo.discoveryclient-httpclient_requestconnectiontimer.count": 0.13333333333333333,    "Gauge.servo.discoveryclient-httpclient_requestconnectiontimer.min": 0.016037,    "Gauge.servo.discoveryclient-httpclient_requestconnectiontimer.max": 0.050036,    "Normalized.servo.discoveryclient-httpclient_createconnectiontimer.totaltime": 0.0004543833333333333,    "Normalized.servo.discoveryclient-httpclient_createconnectiontimer.count": 0.03333333333333333,    "Gauge.servo.discoveryclient-httpclient_createconnectiontimer.min": 0.013470999999999999,    "Gauge.servo.discoveryclient-httpclient_createconnectiontimer.max": 0.013791999999999999,    "Gauge.servo.connectioncount": 1,    "Gauge.servo.eurekaclient.registry.lastupdatesec_00015": 1,    "Gauge.servo.eurekaclient.transport.quarantinesize": 0,    "Gauge.servo.response.unmapped": 270,    "Gauge.servo.response.invoice.invoiceinfo.list": 335,    "gauge.servo.eurekaclient.registry.lastupdatesec_00120": 0,    "Normalized.servo.eureka-connection-cleaner-time.totaltime": 0.00047041666666666667,    "Normalized.servo.eureka-connection-cleaner-time.count": 0.03333333333333333,    "Gauge.servo.eureka-connection-cleaner-time.min": 0.012829,    "Gauge.servo.eureka-connection-cleaner-time.max": 0.015396,    "Counter.servo.eureka-connection-cleaner-failure": 0,    "gauge.servo.eurekaclient.registry.lastupdatesec_00030": 0,    "Httpsessions.max":-1,    "Httpsessions.active": 0}

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

Spring-boot-starter-actuator Simple to use

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.