五分钟带你玩转prometheus(七)监控linux

简介: 五分钟带你玩转prometheus(七)监控linux


1.下载

node-exporter_rev17 (展示面板)

链接:https://pan.baidu.com/s/1d1Aogy6PkFu2wkW-ArsXsw 

提取码:0ajw

node-exporter

链接:https://pan.baidu.com/s/1o3y2ciTqEszDByokfMU_Xw 

提取码:wf1x

2.配置被监控服务器

因为需要监控linux服务器 所以 需要在被监控的linux必须安装node-exporter

解压即可

node-exporter默认端口为9100

tar -xvf node_exporter-0.17.0.linux-amd64.tar.gz -C /usr/local/

然后设置后台启动

1. cd /usr/local/node_exporter-0.17.0.linux-amd64
2. nohup ./node_exporter

3.设置prometheus

进入/usr/local/prometheus-2.17.1.linux-amd64/prometheus.yml

修改prometheus.yml 红框部分为添加

image.png

  - job_name: 'linux'
    static_configs:
    - targets: ['localhost:9100']
      labels:
        instance: linux

4.配置grafana

配置数据源 也就是prometheus地址

image.png

image.png

这里填写你prometheus地址(注意不是node-exporter的地址) 点击save后 如果失败会有提示 检查 9100端口是否起来了

然后配置显示模板面板

image.png

image.png

导入上面下载的可视化界面模板

image.png

image.png

如果出现以下显示 则安装成功

image.png

也可以去https://grafana.com/grafana/dashboards 下载自己需要的面板


相关文章
|
Prometheus 监控 Cloud Native
Prometheus+Grafana监控Linux主机
通过本文的步骤,我们成功地在 Linux 主机上使用 Prometheus 和 Grafana 进行了监控配置。具体包括安装 Prometheus 和 Node Exporter,配置 Grafana 数据源,并导入预设的仪表盘来展示监控数据。通过这种方式,可以轻松实现对 Linux 主机的系统指标监控,帮助及时发现和处理潜在问题。
1829 7
|
Prometheus 运维 监控
Prometheus+Grafana+NodeExporter:构建出色的Linux监控解决方案,让你的运维更轻松
本文介绍如何使用 Prometheus + Grafana + Node Exporter 搭建 Linux 主机监控系统。Prometheus 负责收集和存储指标数据,Grafana 用于可视化展示,Node Exporter 则采集主机的性能数据。通过 Docker 容器化部署,简化安装配置过程。完成安装后,配置 Prometheus 抓取节点数据,并在 Grafana 中添加数据源及导入仪表盘模板,实现对 Linux 主机的全面监控。整个过程简单易行,帮助运维人员轻松掌握系统状态。
2899 3
|
Prometheus 监控 Cloud Native
在Linux中,如何使用Grafana和Prometheus进行网络监控和可视化?
在Linux中,如何使用Grafana和Prometheus进行网络监控和可视化?
|
Prometheus 监控 Cloud Native
Linux|centos二进制方式安装系统和网络监控神器prometheus+grafana(装逼神器它来了)(基础篇 一)
Linux|centos二进制方式安装系统和网络监控神器prometheus+grafana(装逼神器它来了)(基础篇 一)
1043 0
|
Prometheus Cloud Native Linux
Linux|错误集锦|prometheus Error on ingesting samples that are too old or are too far into the future的解决
Linux|错误集锦|prometheus Error on ingesting samples that are too old or are too far into the future的解决
1159 0
Linux|错误集锦|prometheus Error on ingesting samples that are too old or are too far into the future的解决
|
Prometheus Cloud Native Linux
Linux下安装prometheus & grafana
Linux下安装prometheus & grafana
1693 0
|
Prometheus 监控 Cloud Native
Linux|centos7 Prometheus的自动服务发现 一(文件发现机制)
Linux|centos7 Prometheus的自动服务发现 一(文件发现机制)
490 0
|
Linux 应用服务中间件 Shell
二、Linux文本处理与文件操作核心命令
熟悉了Linux的基本“行走”后,就该拿起真正的“工具”干活了。用grep这个“放大镜”在文件里搜索内容,用find这个“探测器”在系统中寻找文件,再用tar把东西打包带走。最关键的是要学会使用管道符|,它像一条流水线,能把这些命令串联起来,让简单工具组合出强大的功能,比如 ps -ef | grep 'nginx' 就能快速找出nginx进程。
1247 1
二、Linux文本处理与文件操作核心命令
linux命令—stat
`stat` 是 Linux 系统中用于查看文件或文件系统详细状态信息的命令。相比 `ls -l`,它提供更全面的信息,包括文件大小、权限、所有者、时间戳(最后访问、修改、状态变更时间)、inode 号、设备信息等。其常用选项包括 `-f` 查看文件系统状态、`-t` 以简洁格式输出、`-L` 跟踪符号链接,以及 `-c` 或 `--format` 自定义输出格式。通过这些选项,用户可以灵活获取所需信息,适用于系统调试、权限检查、磁盘管理等场景。
981 137
|
安全 Ubuntu Unix
一、初识 Linux 与基本命令
玩转Linux命令行,就像探索一座新城市。首先要熟悉它的“地图”,也就是/根目录下/etc(放配置)、/home(住家)这些核心区域。然后掌握几个“生存口令”:用ls看周围,cd去别处,mkdir建新房,cp/mv搬东西,再用cat或tail看文件内容。最后,别忘了随时按Tab键,它能帮你自动补全命令和路径,是提高效率的第一神器。
1967 58