系统性能监控

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

posted @   Bigben  阅读(78)  评论(0编辑  收藏  举报
(评论功能已被禁用)
相关博文:
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
点击右上角即可分享
微信分享提示