- SpringBoot : 2.4.4
- Java : 11
In 2.x, Actuator keeps its fundamental intent but simplifies its model, extends its capabilities, and incorporates better defaults. First, this version becomes technology-agnostic. It also simplifies its security model by merging it with the application one. Among the various changes, it's important to keep in mind that some of them are breaking. This includes HTTP requests and responses as well as Java APIs. Lastly, the latest version now supports the CRUD model as opposed to the old read/write model.
- BaseURL
http://localhost:8080/actuator
- ์ดํ๋ฆฌ์ผ์ด์ ์ ๋ํ ๊ธฐ๋ณธ์ ์ธ ์ ๋ณด๋ฅผ ์ ๊ณต
- Status
- Up : ์๋ฒ ์ ์
- Down : DB ์ฐ๊ฒฐ ๋ฌธ์ , ๋๋ ๋์คํฌ ๊ณต๊ฐ ๋ถ์กฑ
http://localhost:8080/actuator/health
http://localhost:8080/actuator/metrics
- JVM memory ์ฌ์ฉ๋ฅ
- CPU usage
- ๋ฉํธ๋ฆญ์์ ์ ๊ณตํด์ฃผ๋ ๊ธฐ๋ฅ๋ค์ ๋ง๋ค. ์ํ๋ ๋ฉํธ๋ฆญ์ checkํ ์ ์๋ค.
- ์๋ฅผ ๋ค๋ฉด ๋ค์๊ณผ ๊ฐ๋ค.
http://localhost:8080/actuator/metrics/jvm.buffer.memory.used
- Application log ํ์ธ
- Runtime์์ ์ log level์ ๋ฐ๊ฟ ์๋ ์์
http://localhost:8080/actuator/loggers
http://localhost:8080/actuator/info
- ๊ธฐ๋ณธ์ ์ผ๋ก๋ false๋ก ์ค์ ๋์ด ์์
- shutdown ์๋ํฌ์ธํธ๋ ๋ณด์์ด ์ค์.
- ๋ง์ฝ ๋ ธ์ถํ๋ค๋ฉด ๊ผญ ๋ณด์์ ์ค์ ํ ๊ฒ(SpringSecurity)
Unlike in previous versions, Actuator comes with most endpoints disabled. Thus, the only two available by default are /health and /info. If we want to enable all of them, we could set management.endpoints.web.exposure.include=*. Alternatively, we can list endpoints that should be enabled.
Spec์ ๋ํด ์กฐ์ฌํ๊ณ ์ฌ์ฉํ ๊ฒ(์ฌ์ฉ๋ฒ์ด ๋ค ๋ค๋ฆ)
/auditeventslists security audit-related events such as user login/logout. Also, we can filter by principal or type among other fields./beansreturns all available beans in our BeanFactory. Unlike/auditevents, it doesn't support filtering./conditions, formerly known as/autoconfig, builds a report of conditions around autoconfiguration./configpropsallows us to fetch all @ConfigurationProperties beans./envreturns the current environment properties. Additionally, we can retrieve single properties./flywayprovides details about our Flyway database migrations./healthsummarizes the health status of our application./heapdumpbuilds and returns a heap dump from the JVM used by our application./inforeturns general information. It might be custom data, build information or details about the latest commit./liquibasebehaves like /flyway but for Liquibase./logfilereturns ordinary application logs./loggersenables us to query and modify the logging level of our application./metricsdetails metrics of our application. This might include generic metrics as well as custom ones./prometheusreturns metrics like the previous one, but formatted to work with a Prometheus server./scheduledtasksprovides details about every scheduled task within our application./sessionslists HTTP sessions given we are using Spring Session./shutdownperforms a graceful shutdown of the application./threaddumpdumps the thread information of the underlying JVM.