糖尿病康复,内容丰富有趣,生活中的好帮手!
糖尿病康复 > 安装 Prometheus 指标存储 观测 dubbo /windows_exporter指标 windows 版本 其他系统换个语法思路一样

安装 Prometheus 指标存储 观测 dubbo /windows_exporter指标 windows 版本 其他系统换个语法思路一样

时间:2024-01-05 20:04:57

相关推荐

安装 Prometheus 指标存储 观测 dubbo /windows_exporter指标 windows 版本 其他系统换个语法思路一样

目录

下载 Prometheus

访问Prometheus

Targets 发现服务

对应的 dubbo 指标就出来了

Dubbo脚手架生成个最简单的项目

导入 Prometheus 相关包

或者使用这个包即可

启动后就自动上报指标了

Windows_exporter or node_exporter

端口 9182

Prometheus 配置 windows_exporter

Targets 自动就出来了

Windows 系统的 指标就出来了

配个指标都就出来了

下载 Prometheus

清华大学开源镜像站

清华大学开源软件镜像站 | Tsinghua Open Source Mirror

根目录下直接启动即可 无其他操作

访问Prometheus

http://localhost:9090/ 访问 Prometheus

Targets 发现服务

对应的 dubbo 指标就出来了

选择指标后选择graph 或 table 就可以看报告内容了

Dubbo脚手架生成个最简单的项目

Initializer Dubbo

导入 Prometheus 相关包

<dependency><groupId>org.apache.dubbo</groupId><artifactId>dubbo-metrics-prometheus</artifactId></dependency><dependency><groupId>io.micrometer</groupId><artifactId>micrometer-core</artifactId></dependency><dependency><groupId>io.micrometer</groupId><artifactId>micrometer-registry-prometheus</artifactId></dependency>

或者使用这个包即可

<dependency><groupId>org.apache.dubbo</groupId><artifactId>dubbo-spring-boot-observability-starter</artifactId><version>3.2.0</version></dependency>

启动后就自动上报指标了

Windows_exporter or node_exporter

下载

GitHub - prometheus-community/windows_exporter: Prometheus exporter for Windows machines

Releases · prometheus-community/windows_exporter ()

下载下来直接启动即可

端口 9182

Prometheus 配置 windows_exporter

# 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).# Alertmanager configurationalerting:alertmanagers:- static_configs:- targets:# - alertmanager:9093# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.rule_files:# - "first_rules.yml"# - "second_rules.yml"#- win_alert_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=<job_name>` to any timeseries scraped from this config.- job_name: "prometheus"# metrics_path defaults to '/metrics'# scheme defaults to 'http'.static_configs:- targets: ["localhost:9090"]- job_name: "dubbo-p"static_configs:- targets: ["localhost:8101","localhost:20880","localhost:22222"]- job_name: "windows-exporter"static_configs:- targets: ["localhost:9182"]

Targets 自动就出来了

Windows 系统的 指标就出来了

配个指标都就出来了

ok

持续更新

如果觉得《安装 Prometheus 指标存储 观测 dubbo /windows_exporter指标 windows 版本 其他系统换个语法思路一样》对你有帮助,请点赞、收藏,并留下你的观点哦!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。