In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
In this article, the editor introduces in detail "how to achieve service monitoring by SpringBootAdmin+actuator". The content is detailed, the steps are clear, and the details are handled properly. I hope this article "how to achieve service monitoring with SpringBootAdmin+actuator" can help you solve your doubts.
SpringBootAdmin can monitor SpringBoot clicks or cluster projects, providing detailed health information, memory information, JVM system and environment properties, garbage collection information, log settings and viewing, timing task viewing, SpringBoot cache viewing and management functions.
Step 1: build the monitoring server
Create a SpringBoot project and add the following dependencies
Org.springframework.boot spring-boot-starter-web de.codecentric spring-boot-admin-starter-server
Enable the monitoring service on the startup class
Import de.codecentric.boot.admin.server.config.EnableAdminServer;import org.springframework.boot.SpringApplication;import org.springframework.boot.autoconfigure.SpringBootApplication; @ EnableAdminServer@SpringBootApplicationpublic class SysadminApplication {public static void main (String [] args) {SpringApplication.run (SysadminApplication.class, args); System.out.println ("Project started successfully!") ;}}
Only one service port needs to be configured in the configuration file. The purpose of configuring ports is not to conflict with other services.
Server.port=8081
Start the server, and visit the address: http://localhost:8081/applications interface as follows
Step 2: client build configuration
1. Required dependence
De.codecentric spring-boot-admin-starter-client org.springframework.boot spring-boot-starter-actuator
2. Add the following configuration to the client configuration file
Note: if it is a yml configuration file, when monitoring all items is enabled in the configuration, * you need to wrap it in single quotation marks
# current project port number, server.port=8080# Spring Boot Admin monitoring server address, spring.boot.admin.client.url= http://localhost:8081#, enable monitoring all items, Actuator function management.endpoints.web.exposure.include=*
3. Start the project and use the server home page address to view the http://localhost:8081/applications.
After reading this, the article "how to achieve Service Monitoring with SpringBootAdmin+actuator" has been introduced. If you want to master the knowledge points of this article, you still need to practice and use it yourself. If you want to know more about related articles, you are welcome to follow the industry information channel.
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.