Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Use prometheus and grafana to increase monitoring of spring-boot&dubbo projects (1)

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

Download prometheus

https://prometheus.io/download/

Here we have prometheus-2.10.0.linux-amd64.tar.gz.

Install prometheus

Execute decompression command

tar -zxvf prometheus-2.10.0-rc.0.linux-amd64.tar.gz

Configure prometheus

modify prometheus.yml,

vim prometheus.yml

Add below

- job_name: 'micro-service'metrics_path: /actuator/prometheusserverset_sd_configs:- servers: - 'ip:2181' - 'ip:2181' - 'ip:2181' paths: - /prometheus

job_name can be started at will

metrics_path: is the endpoint provided by spring-boot

servers: configure the address of dubbo registry zk

Initiate prometheus

nohup ./ prometheus > prometheus.log &

download grafana

https://grafana.com/grafana/download

Download and install according to the official website steps, download speed is a little slow, need to wait patiently

Start grafana

service grafana-server start

Start-up may give an error

View grafana logs

vim /var/log/grafana/grafana.log

Create grafana directory under/var/run directory and modify owner

mkdir grafanachown grafana:grafana grafana configure prometheus data sources

Visit IP:3000

Select add data source

Select Prometheus

Configure the newly installed prometheus information in the url

A Dashboard with ID 4701 is recommended.

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.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report