普罗米修斯安装node_exporter组件
1.下载安装
下载地址:https://prometheus.io/download/
上传服务器local下
解压
为了后续使用方便更名为:node_exporter
启动服务:
nohup /usr/local/node_exporter/node_exporter &
查看端口9100占用情况
浏览器查看页面
修改普罗米修斯监控收集node节点信息
- 在prometheus服务器的配置文件里添加被监控机器的配置段/usr/local/prometheus/prometheus.yml
- 修改prometheus.yml配置文件
# 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" # 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: "mysql114" static_configs: - targets: ["10.0.0.13:9104"] - job_name: "node13" static_configs: - targets: ["10.0.0.13:9100"]
重启Prometheus服务
#启动
systemctl start prometheus.service
#停止
systemctl stop prometheus.service
如果服务器是windows的版本
需要创建目录c:program files/windows_exporter/textfile_inputs,否则提示错误
在grafana可视化可以看到
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 单线程的Redis速度为什么快?
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 展开说说关于C#中ORM框架的用法!