In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "what are the endpoints supported by Spring Boot". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn which endpoints are supported by Spring Boot.
First of all, let's sort out what application monitoring needs. In fact, there are only two points:
Information collector
Data visualization UI
The information collector will collect and expose the health, audit, indicators, HTTP requests and other information of the application, while the data visualization UI will display these data through dashboards and graphics, and analyze the data, alarm and other processing. Let's look at it separately.
Spring Boot Actuator in the Spring Boot project, the main information collector we use is Spring Boot Actuator, which is officially provided by Spring Boot. It contains many production-level functions, such as health check, audit, indicator collection, HTTP request tracking, and so on. After Spring Boot Actuator collects this information, it is exposed to the external module through HTTP and JMX. For example, Spring Boot Actuator provides the health information of the application through the / health endpoint (endpoints). Developers only need to visit the endpoint to see the health information of the application, but the data returned by these endpoints is in JSON format, which is not easy to view or analyze, so in general, Spring Boot Actuator is used with some external modules.
Spring Boot Actuator
The main endpoints supported are as follows:
If it is a Web application, the following endpoints are supported again:
When it comes to Spring Boot Actuator, there is one more thing to introduce to you, and that is Micrometer. Starting with Spring Boot2.0, the bottom layer of Actuator has been changed to Micrometer.
When we introduce an Actuator dependency into a Spring Boot project, we find that it contains Micrometer:
What is this dependence for?
Micrometer provides a general API for performance data collection on the Java platform. Applications only need to use Micrometer's general API to collect performance metrics, while Micrometer is responsible for adapting to different monitoring systems, similar to an Adapter. With this Adapter, it becomes very easy to switch monitoring systems. At the same time, Micrometer also supports pushing data to several different monitoring systems.
On the other hand, Spring Boot Actuator uses Micrometer to integrate with the external application monitoring system, so that developers only need a little configuration to integrate it with the external application monitoring system. The monitoring systems supported by Micrometer are:
AppOptics
Atlas
Datadog
Dynatrace
Elastic
Ganglia
Graphite
Humio
Influx
JMX
KairosDB
New Relic
Prometheus
SignalFx
Simple (in-memory)
StatsD
Wavefront
In the area of information collector, to be honest, most of the projects seen by Song GE are using Spring Boot Actuator, and there seems to be no better choice. If your friends are useful to other plans, you can also leave a message for discussion.
Next, let's take a look at some common application monitoring visualization tools.
Spring Boot Admin
This is the most authentic application monitoring visualization tool in Spring Boot. You can see how authentic it is by looking at its name. When we create a Spring Boot project, we have this option when we choose dependency:
If it is a single application, many people may choose Spring Boot Admin as a monitoring data visualization tool, but it also supports micro-service applications (application information can be obtained through Eureka, Consul and other registries), but in micro-services, we may choose more Grafana+Prometheus combinations.
Spring Boot Admin mainly includes the following functions:
Displays application health information.
Displays details of the running of the application, such as JVM and memory metrics, data source metrics, cache metrics, and so on.
Displays the build information for the application.
View JVM system and environment properties
View Spring Boot configuration properties
Support for endpoint refresh in Spring Cloud / refresh-endpoint
Convenient log-level management function
Can interact with JMX-beans
View Thread dump
View http request
View scheduled tasks
View and delete active session
View Flyway/Liquibase database migration
Download heapdump
Status change notification
...
As you can see, Spring Boot Admin not only visualizes the data in the Actuator interface, but also provides analysis, alarm and other functions.
The display interface of Spring Boot Admin is as follows:
Grafana+Prometheus
This combination is common in microservice projects, as mentioned in Song GE's previously recorded Spring Cloud video.
Prometheus is an open source monitoring + timing database + alarm software, developed by SoundCloud, hosted by the CNCF Foundation and has been successfully hatched, but the UI of this Prometheus is relatively simple, the user experience is not very good, and now large-screen monitoring pages are popular, showing a variety of cool charts. Therefore, in practical applications, Prometheus is generally used in conjunction with Grafana. Grafana is also an open source cross-platform metric analysis and visualization + alarm tool. It supports a variety of data sources, including Prometheus,Grafana 's UI, as shown below:
Of course, you can't use this combination without Spring Boot Actuator.
Thank you for reading, the above is the content of "what are the endpoints supported by Spring Boot". After the study of this article, I believe you have a deeper understanding of what the endpoints supported by Spring Boot have, and the specific usage still needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.