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

news/2024/5/18 5:56:22 标签: prometheus, dubbo, windows

目录

下载 Prometheus

访问Prometheus

Targets 发现服务

dubbo%20%E6%8C%87%E6%A0%87%E5%B0%B1%E5%87%BA%E6%9D%A5%E4%BA%86-toc" style="margin-left:80px;"> 对应的 dubbo 指标就出来了

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

导入 Prometheus 相关包

或者使用这个包即可

启动后就自动上报指标了

Windows_exporter  or node_exporter

端口 9182

windows_exporter-toc" style="margin-left:80px;">Prometheus 配置 windows_exporter

Targets 自动就出来了

Windows 系统的 指标就出来了

配个指标都就出来了


下载 Prometheus

清华大学开源镜像站

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

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

访问Prometheus

http://localhost:9090/  访问 Prometheus

Targets 发现服务

dubbo%20%E6%8C%87%E6%A0%87%E5%B0%B1%E5%87%BA%E6%9D%A5%E4%BA%86" style="margin-left:0;"> 对应的 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 (github.com)

下载下来直接启动即可

端口 9182

windows_exporter" style="margin-left:0;">Prometheus 配置 windows_exporter

# my global config
global:
  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 configuration
alerting:
  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

持续更新


http://www.niftyadmin.cn/n/698052.html

相关文章

Bean的生命周期(了解)

问题1&#xff1a;多例的Bean能够配置并执行销毁的方法&#xff1f; 问题2&#xff1a;如何做才执行Bean销毁的方法&#xff1f; 1. 生命周期相关概念介绍 生命周期&#xff1a;从创建到消亡的完整过程 bean生命周期&#xff1a;bean从创建到销毁的整体过程 bean生命周期控…

哈夫曼树的原理及构造方法

目录 1. 什么是哈夫曼树 2. 为什么有哈夫曼树 3. 哈夫曼树的原理 3.1 哈夫曼树的构造方法 3.2 哈夫曼解码 3.3 几种定义 4. 哈夫曼二叉树的特点 5. 关于哈夫曼树的代码 1. 什么是哈夫曼树 哈夫曼树解决的是编码问题&#xff0c;给定N个权值作为N个叶子结点&#xff0c;构…

关于Long的前后端传参,精度丢失问题

若后端接受格式为 List<Long> 则前端传参时不能为 int型 需要改为 &#xff0c;加上双引号

解决Tomcat控制台窗口输出乱码问题

由于编码的问题&#xff0c;tomcat的控制台窗口输出的都是中文乱码&#xff0c;这明显是编码格式导致的&#xff0c;只要找到对应的编码格式修改一下就好了&#xff0c; 由于我的服务器编码是GBK&#xff0c;所有只需把输出的编码修改为GBK就行了。 936就是GBK编码。找到tomca…

python篇---统计列表中每个数字的出现次数

python篇—统计列表中每个数字的出现次数 # -*- coding: utf-8 -*- from collections import Counterlst [1, 2, 3, 3, 4, 1, 2, 5, 5, 5] count Counter(lst) print(每个数字在列表中的出现次数&#xff1a;, count) # 再将collections.Counter格式转换成dict print(dict(c…

Matlab实现蚁群算法求解城市路径最短距离和平均距离(附上完整仿真源码+数据)

蚁群算法是一种模拟蚂蚁寻找食物的行为而设计的一种启发式搜索算法。本文将介绍如何使用Matlab编程实现蚁群算法&#xff0c;以求解城市路径的最短距离和平均距离。我们将通过定义城市之间的距离矩阵、初始化算法参数、迭代更新蚂蚁路径和信息素矩阵等步骤&#xff0c;来实现这…

【Kubernetes】使用Kubeshark监控K8s集群的API流量

Kubeshark 是一款针对 Kubernetes 的 API 流量分析器,提供对 Kubernetes 内部网络的实时协议级可见性,捕获和监控进出容器、Pod、节点和集群的所有流量和有效负载。 Kubeshark 的安装和运行很简单,安装之前,我们需要先联网下载一个二进制文件(当前最新版:41.1)。 Linux…