系统性能监控
1 监控系统
下载网站:
https://prometheus.io/download/
1.1 node explorer 安装
wget https://github.com/prometheus/node_exporter/releases/download/v1.2.2/node_exporter-1.2.2.linux-amd64.tar.gz
tar -xzf node_exporter-1.2.2.linux-amd64.tar.gz
cd node_exporter-1.2.2.linux-amd64/
./node_exporter
firewall-cmd --permanent --zone=public --add-port=9100/tcp
firewall-cmd --reload
访问:http://192.168.124.148:9100/
1.2 Prometheus 直接运行exe
Prometheus.exe --web.listen-address="0.0.0.0:9091"
如果node_exporter服务器ip变了,要改prometheus.yml中
# 采集node exporter监控数据 - job_name: 'node' static_configs: - targets: ['192.168.124.148:9100']
1.3 grafana
安装后访问:
http://localhost:3000
admin/admin1 默认
1.3.1 配置数据源
点击Configuration -> Data Sources -> Add data source 选择Prometheus
然后配置URL:http://prometheus:9091
修改抓取时间,查询超时时间等参数,设置完成后点击Save & Test
1.3.2 配置Dashboard
接下来配置Dashboard,在https://grafana.com/grafana/dashboards 中搜索选择别人开发好的面板,推荐https://grafana.com/grafana/dashboards/8919
点击Dashboards -> Manage -> Import,输入选择的dashboard地址,点击load,选择prometheus数据源,配置完成后点击Import。
参考
https://cloud.tencent.com/developer/article/1808172
https://www.cnblogs.com/hiyong/p/14587293.html
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?