ELK-03-skywalking监控linux系统

文章目录


前言

skywalking安装完成后,开始我们的第一个监控-监控linux系统。

参考官方文档:

https://skywalking.apache.org/docs/main/next/en/setup/backend/backend-vm-monitoring/


一、下载node_exporter

下载地址:https://prometheus.io/download/#node_exporter

或者:https://github.com/prometheus/node_exporter/tags

我下载的是最新版v1.8.2

二、启动node_exporter

上传压缩包到服务器并解压

执行:

bash 复制代码
cd /opt/node_exporter/node_exporter-1.8.2.linux-arm64
./node_exporter 

执行成功后如图:

浏览器打开:http://10.211.55.120:9100

如图:

三、下载OpenTelemetry Collector

下载地址:https://opentelemetry.io/docs/collector/installation/

或者:https://github.com/open-telemetry/opentelemetry-collector-releases/releases/tag/v0.109.0

我是arm架构cpu,所以下载otelcol_0.109.0_linux_arm64.tar.gz

四、启动OpenTelemetry Collector

4.1 将配置文件下载到同级目录

下载地址:https://github.com/apache/skywalking/blob/b857fb009116e13450c981c76cc5d9170a76f070/test/e2e-v2/cases/vm/prometheus-node-exporter/otel-collector-config.yaml

记得要改其中的两个注意点。

配置文件otel-collector-config.yaml内容如下:

yaml 复制代码
receivers:
  prometheus:
    config:
      scrape_configs:
        - job_name: "vm-monitoring" # make sure to use this in the vm.yaml to filter only VM metrics
          scrape_interval: 10s
          static_configs:
            - targets: ["10.211.55.120:9100"] #注意点1:要改为ip

processors:
  batch:

exporters:
  otlp:
    endpoint: "10.211.55.120:11800" # The OAP Server address #注意点2:要改为ip
    # The config format of OTEL version prior to 0.34.0, eg. 0.29.0, should be:
    # insecure: true
    tls:
      insecure: true
    #insecure: true
  # Exports data to the console
  logging:
    loglevel: debug

service:
  pipelines:
    metrics:
      receivers: [prometheus]
      processors: [batch]
      exporters: [otlp, logging]

如图:

4.2 启动

bash 复制代码
cd /opt/otelcol
./otelcol --config=./otel-collector-config.yaml

启动成功后会一直打印数据。

五、查看

到skywalking网页中,在仪表盘-仪表盘列表-找到Linux-Service,点进去即可看到监控数据:


总结

深度学习请看官方文档。

相关推荐
chian-ocean17 分钟前
Linux 文件缓冲区:高效数据访问的幕后推手
linux·运维·服务器
加油=^_^=19 分钟前
【Linux】进程优先级 | 进程调度(三)
linux·运维·服务器
吃汤圆的抹香鲸1 小时前
GoLand 安装包 绿色版 Win,Mac,Linux 包含IntelliJ全家桶 专为Go语言设计的集成开发环境(IDE)
linux·windows·macos·go·intellij-idea·go1.19
追寻光1 小时前
Cannot find a valid baseurl for repo: base/7/x86_64
linux
元气满满的热码式1 小时前
Docker数据卷操作实战
linux·运维·docker·云原生·容器
陆沙1 小时前
deepseek-r1-centos-本地服务器配置方法
linux·服务器·centos
吃汤圆的抹香鲸1 小时前
Rider 安装包 绿色版 Win/Mac/Linux 适合.NET和游戏开发者使用 2025全栈开发终极指南:从零配置到企业级实战
linux·运维·windows·sql·游戏·macos·.net
sz66cm1 小时前
Linux基础 -- ARM 32 位架构动态注入代码技术文档
linux·arm开发·架构
Mr.pyZhang4 小时前
Android构建系统 - 04 编译产物
android·linux
ansondroider8 小时前
Buildroot 添加自定义模块-内置文件到文件系统
linux·buildroot