EDUCBA

EDUCBA

MENUMENU
  • Free Tutorials
  • Free Courses
  • Certification Courses
  • 600+ Courses All in One Bundle
  • Login
Home Software Development Software Development Tutorials Spring Tutorial spring boot actuator endpoints
Secondary Sidebar
Spring Tutorial
  • Spring Boot
    • What is Spring Boot
    • Spring Boot flyway
    • Spring Boot framework
    • Spring Boot Logback
    • Spring Boot actuator endpoints
    • Spring Boot gRPC
    • Spring Boot jdbctemplate example
    • Spring Boot ehcache
    • Spring Boot Architecture
    • Spring Boot Port
    • Introduction of spring boot
    • Spring Boot ide
    • Spring Boot Netty
    • Spring Boot ORM
    • Spring Boot Versions
    • Spring Boot JUnit
    • Spring Boot Keycloak
    • Spring Boot gradle
    • Spring Boot Lombok
    • Spring Boot autowired
    • Spring Boot bean
    • Spring Boot hibernate
    • Spring Boot integration test
    • Spring Boot jdbc
    • Spring Boot MongoDB
    • Spring Boot postgresql
    • Spring Boot rest
    • Spring Boot swagger
    • Spring Boot thymeleaf
    • Spring Boot Unit Test
    • Spring Boot Webflux
    • Spring Boot webclient
    • Spring Boot kubernetes
    • Spring Boot Properties
    • Spring Boot Validation
    • Spring Boot Feature
    • Spring Boot Application
    • Spring Boot email
    • Spring Boot MVC
    • Spring Boot Exception Handling
    • Spring Boot Starter Parent
    • Spring Boot Docker
    • Spring Boot Logging
    • Spring Boot Query
    • Spring Boot Multiple Data Sources
    • Spring Boot Basic Authentication
    • Spring Boot Test
    • Spring Boot jwt
    • Spring Boot Liquibase
    • Spring Boot Prometheus
    • Spring Boot debug
    • Spring Boot GraalVM
    • Spring Boot Batch
    • Spring Boot controller
    • Spring Boot CLI
    • Spring Boot file upload
    • Spring Boot interceptor
    • Spring Boot Service
    • Spring Boot Configuration
    • Spring Boot Datasource Configuration
    • Spring Boot Annotations
    • Spring Boot Starter We
    • Spring Boot Actuator
    • Spring Boot DevTools
    • Spring Boot Repository
    • Spring Boot Dependencies
    • Spring Boot Path Variable
    • Spring Boot Microservices
    • Spring Boot Run Command
    • Spring Boot application.properties
    • Spring Boot Transaction Management
    • Spring Boot Banner
    • Spring Boot JPA
    • Spring Boot Change Port
    • Spring Boot RestTemplate
    • Spring Boot cors
    • Spring Boot HTTPS
    • Spring Boot OAuth2
    • Spring Boot Profiles
    • Spring Boot Interview Questions
    • Spring Boot filter
    • Spring boot logging level
    • Spring Boot Cache
    • Spring Boot Advantages
    • Spring Boot Scheduler
    • Spring Boot Initializr
    • Spring Boot Maven
    • Spring Boot Admin
    • Spring Boot Tomcat
    • Spring Boot WebSocket
    • Spring Boot Executable Jar
    • Spring Boot CommandLineRunner
    • Spring Boot DataSource
    • Spring boot grpc
    • Spring Batch Scheduler
    • Spring Batch Example
    • Spring Batch Tasklet
    • Spring Batch Admin
    • Spring Batch
    • Spring Boot Qualifier
    • Spring Boot War
    • Spring Boot Test Configuration
  • Spring
    • What is Spring Framework?
    • Spring Architecture
    • What is Spring Integration?
    • IoC Containers
    • What is AOP?
    • Spring Modules
    • Spring Batch Processing
    • Spring Batch Partitioner
    • Spring Batch Job
    • Spring AOP
    • Spring Expression Language
    • Dependency Injection in Spring
    • Spring Batch Architecture
    • Spring framework Interview Questions
  • Spring Cloud Basics
    • What is Spring Cloud
    • Spring Cloud Contract
    • Spring Cloud Components
    • Spring Cloud Version
    • Spring Cloud Data Flow
    • Spring cloud stream
    • Spring Cloud Dependencies
    • Spring cloud microservices
    • spring cloud gateway
    • Spring Cloud Config
    • Spring Cloud Kubernetes
    • Spring Cloud Sleuth

Related Courses

Spring Boot Certification Course

Spring Framework Course Training

All in One Data Science Course

spring boot actuator endpoints

spring boot actuator endpoints

Introduction to spring boot actuator endpoints

Spring boot actuator endpoints provide secured endpoints for managing and monitoring the spring boot application. As we know that all the spring boot actuator endpoints are secured, we need to add the actuator dependency of spring boot to enable the spring boot actuator endpoints in our application. Spring boot actuator endpoint is nothing but the spring boot framework subproject; it will include the number of features which was used to monitor and manage the spring boot application. In addition, it will contain the endpoints of the actuator; we can use the HTTP and JMX endpoint in the spring boot application.

All in One Software Development Bundle(600+ Courses, 50+ projects)
Python TutorialC SharpJavaJavaScript
C Plus PlusSoftware TestingSQLKali Linux
Price
View Courses
600+ Online Courses | 50+ projects | 3000+ Hours | Verifiable Certificates | Lifetime Access
4.6 (86,130 ratings)

Spring boot actuator endpoints overview

  • Spring boot actuator endpoints have some additional features also it includes the number of built-in endpoints. An example of the built-in endpoint is the spring boot health actuator endpoint is providing information regarding health.
  • Using spring boot actuator endpoints, we can monitor our spring boot application by using JMX or HTTP endpoint.
  • We can enable, disable, and exposed each spring boot actuator endpoint in our spring boot application.

Spring boot actuator endpoints technology

  • Multiple built-in endpoints are available in spring boot; we can also add custom endpoints in our spring boot application.
  • Below is the endpoints which were widely used in our spring boot application are as follows.
  • Actuator – This endpoint provides the discovery page to the other endpoints.
  • Auditevents – This endpoint is exposed information of audit events.
  • Trace – This endpoint is used to display traced information.
  • Shutdown – This endpoint is used to shut down our application forcefully.
  • Mappings – This endpoint is used to display the path of the coated list.
  • Metrics – This endpoint is used to display the information of metrics.
  • Loggers – This endpoint is used to modify and display the logger’s configuration.
  • Info – This endpoint is used to display information regarding the application.
  • Health – This endpoint is used to display information regarding health.
  • Flyway – This endpoint is used to show the database migration.
  • Dump – This endpoint is used to perform dump.
  • Configprops – This endpoint is used to show the list of collated.
  • Beans – This endpoint is used to display all the beans.
  • Autoconfig – This endpoint is used to show the auto-configuration.
  • Docs – This endpoint is used to display the documentation.
  • Spring boot actuator endpoint has the following features we can use in spring boot production-ready applications.
  • Logging
  • Monitoring
  • Tracing
  • Auditing
  • Metrics

Example

Below is the example of endpoint are as follows.

Start Your Free Software Development Course

Web development, programming languages, Software testing & others

  • Create a project template using a spring initializer and give the following name to the project.

In the below step, we have provided project group name as com.example, artifact name as spring-boot-actuator-example, project name as spring-boot-actuator-example, package as a jar file, and selecting java version as 11.

Group – com.example
Artifact name – spring-boot-actuator-example
Name – spring-boot-actuator
Description - Project for spring-boot-actuator-example
Package name - com.example.spring-boot-actuator-example
Packaging – Jar
Java – 11
Dependencies – spring boot actuator

spring boot actuator endpoints output 1

After generating project extract files and open this project by using spring tool suite –

spring boot actuator endpoints output 2

  • After opening the project using the spring tool suite, check the project and its files –

spring boot actuator endpoints output 3

  • Add the dependency –

Code –

<dependency>   -- Start of dependency tag.
<groupId>org.springframework.boot</groupId>   -- Start and end of groupId tag.
<artifactId>spring-boot-starter-actuator</artifactId> -- Start and end of artifactId tag.
</dependency>    -- End of dependency tag.

output 4

  • Create controller class –

Code –

@RestController
public class SpringBootActuator
{
@GetMapping ("/actuator")
public String actuator()
{
return "Spring boot actuator";
}
}

output 5

  • Edit the application.properties file –

Code –

management.security.enabled = false

output 6

  • Run the application –

output 7

  • After running the application, open the below URL in the browser –

Code –

http://localhost:8080/actuator

output 8

Endpoints Exposing

  • We can expose or enable all the available actuator endpoints by default. But we cannot enable the shutdown endpoint by default.
  • We can enable all the endpoints in the spring boot actuator endpoint by using the properties file of the spring boot application.
  • To enable the endpoint in the spring boot actuator application, we need to set the endpoint of property management as enabled into the spring boot application.properties file.
  • We can also use id; the id is needed to be replaced with the name of the actual endpoint name of the application.

Properties endpoints

  • Spring boot endpoints are nothing but the devices, operating system, and application agent, which helped in vulnerabilities to secure the configuration.
  • We can review the current state of the selected endpoint by using template runs. There are two properties of endpoints are as follows.
  1. Descriptive properties
  2. Configurable properties
  • Descriptive properties contain the information regarding the software version and agent which was managing the actuator endpoint.
  • Configurable properties contain the details regarding the change, like the importance of the endpoint.

HTTP endpoints – secure

  • We can secure our HTTP endpoints in the spring boot actuator by setting privileges on get, put, delete and post method.
  • We can also secure http endpoints by providing the specified access to the user; every user doesn’t require access to each service.
  • Setting the privileged-based authorization means only the authorized user deletes the specified content from a file.
  • We can also whitelist the user IP address using the HTTP method; it will be applicable to all the users.

Endpoints -HTTP method

  • Using the monitoring feature of the endpoint HTTP method, we can check the health of our spring boot application.
  • Using the logging feature of the endpoint HTTP method, we are writing the log messages regarding the events which was occur at the time of runtime.
  • Using the tracing feature of the endpoint HTTP method, we are tracing all the HTTP requests of our spring boot application.
  • Using the metrics feature of the endpoint HTTP method, we are measuring the performance of our spring boot application.
  • Using the logging feature of the endpoint HTTP method, we are logging all the authorization events from our spring boot application.

Conclusion

Spring boot actuator endpoint is nothing but a spring boot framework sub-project. Spring boot actuator endpoint enables the security of all the endpoints we have used in the project. Using spring boot actuator endpoints, we can monitor our spring boot application by using JMX or HTTP endpoint.

Recommended Articles

This is a guide to spring boot actuator endpoints. Here we discuss the Spring boot actuator endpoints overview along with the examples and codes. You may also have a look at the following articles to learn more –

  1. Spring Boot Logging
  2. Spring Boot RestTemplate
  3. Spring Boot OAuth2
  4. Spring Boot Banner
Popular Course in this category
Spring Boot Training Program (2 Courses, 3 Project)
  2 Online Courses |  3 Hands-on Projects |  22+ Hours |  Verifiable Certificate of Completion
4.5
Price

View Course

Related Courses

Spring Framework Training (4 Courses, 6 Projects)4.9
All in One Data Science Bundle (360+ Courses, 50+ projects)4.8
0 Shares
Share
Tweet
Share
Primary Sidebar
Footer
About Us
  • Blog
  • Who is EDUCBA?
  • Sign Up
  • Live Classes
  • Corporate Training
  • Certificate from Top Institutions
  • Contact Us
  • Verifiable Certificate
  • Reviews
  • Terms and Conditions
  • Privacy Policy
  •  
Apps
  • iPhone & iPad
  • Android
Resources
  • Free Courses
  • Java Tutorials
  • Python Tutorials
  • All Tutorials
Certification Courses
  • All Courses
  • Software Development Course - All in One Bundle
  • Become a Python Developer
  • Java Course
  • Become a Selenium Automation Tester
  • Become an IoT Developer
  • ASP.NET Course
  • VB.NET Course
  • PHP Course

ISO 10004:2018 & ISO 9001:2015 Certified

© 2022 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA
Free Software Development Course

C# Programming, Conditional Constructs, Loops, Arrays, OOPS Concept

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA Login

Forgot Password?

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA
Free Software Development Course

Web development, programming languages, Software testing & others

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

Let’s Get Started

By signing up, you agree to our Terms of Use and Privacy Policy.

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more

Special Offer - Spring Boot Training Program (2 Courses, 3 Project) Learn More