In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
One: Spring Boot Actuator
Spring-boot-actuator can monitor and manage applications as they are put into production. You can choose to use HTTP endpoints or JMX to manage and monitor applications
Introducing Spring-boot-actuator into Spring boot applications
Org.springframework.boot spring-boot-starter-actuator
3.application.yml file configuration
# managementmanagement: endpoints: web: exposure: include: "*" endpoint: health: show-details: ALWAYS
4.Spring Boot Actuator built-in Endpoints
Two: Prometheus
Add Micrometer Prometheus registration to the Spring Boot application.
Io.micrometer micrometer-registry-prometheus
2.Docker pulls Prometheus image
Docker pull prom/prometheus
3. Prometheus configuration file
# my global configglobal: scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute. Evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute. # scrape_timeout is set to the global default (10s). # Load rules once and periodically evaluate them according to the global 'evaluation_interval'.rule_files: #-"first_rules.yml" #-"second_rules.yml" # A scrape configuration containing exactly one endpoint to scrape:# Here it's Prometheus itself.scrape_configs: # The job name is added as a label `job= `to any timeseries scraped from this config. -job_name: 'prometheus' # metrics_path defaults to' / metrics' # scheme defaults to 'http'. Static_configs:-targets: ['127.0.0.1 job_name 9090']-job_name:' spring-actuator' metrics_path:'/ mybatis/actuator/prometheus' scrape_interval: 5s static_configs:-targets: ['112.74.105.178spring-actuator' metrics_path']
4. Run the Prometheus container
Docker run-d-- name=prometheus-p 9090V / mnt/demo/prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus-- config.file=/etc/prometheus/prometheus.yml
5. View the operation of Prometheus
Three: Grafana
Docker runs Grafana image
Docker run-d-- name=grafana-p 3000UR 3000 grafana/grafana
2. Grafana configure Prometheus data source
3. Monitoring dashboard
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.