首页  

监控系统安装配置及使用     所属分类 architecture 浏览量 1364
prometheus  node_exporter  grafana


基本步骤

在各个节点上安装 node_exporter ,用于采集系统监控指标 ,给 prometheus 抓取
一行一个指标, 其他应用 开放指标数据接口,就能被 prometheus 抓取

在 一个节点上安装 prometheus , 定时抓取 指标 ,给 grafana 提供 数据源
配置抓取目标 抓取 node 或 其他应用的指标

在一个节点上 安装 grafana , 提供 监控数据可视化展示	 

grafana 添加 prometheus 数据源 ,从数据源查询指标数据并展示	 


配置监控图表



node_exporter 启动 nohup ./node_exporter & 查看系统指标数据 一行一个指标 http://192.168.1.10:9100/metrics --web.listen-address=":9100"
prometheus nohup ./prometheus --web.enable-lifecycle & http://192.168.1.10:9090 修改端口 --web.listen-address="0.0.0.0:9090" 查看抓取目标 http://192.168.1.10:9090/targets 抓取配置 prometheus.yml scrape_configs: - job_name: 'app1' # metrics_path defaults to '/metrics' # scheme defaults to 'http'. static_configs: - targets: ['192.168.0.8:8000','192.168.0.8:8010'] - job_name: 'app2' # 非默认值时 需要配置该属性 metrics_path: '/api/metrics' static_configs: - targets: ['127.0.0.1:8080','127.0.0.1:8090'] 重新加载配置 curl -XPOST http://192.168.0.10:9090/-/reload
nohup ./bin/grafana-server web & 默认用户名密码 admin / admin 密码修改成 xxxxxx http://192.168.1.10:3000
参考资料 Node Exporter Full 图表插件 https://grafana.com/dashboards/1860 grafana使用技巧 使用node-exporter监控主机信息 prometheus配置

上一篇     下一篇
ServerBootstrap handler()和childHandler()的区别

性能及问题排查合集

grafana使用技巧

maven使用jetty插件命令行启动web应用

eclipse使用问题

eclipse优化