网站首页 > 精选文章 / 正文
简述prometheus的安装和配置
1、概念
Prometheus由SoundCloud开源告警解决方案。Prometheus既是一个时序数据库,又是一个监控系统,更是一套完备的监控生态解决方案。
优势
监控数的精度高,快速的集群部署,周边插件丰富。
劣势
采集精度高,容易形成性能瓶颈。
2、安装
下载地址:https://prometheus.io/download/
wget https://github.com/prometheus/prometheus/releases/download/v2.31.1/prometheus-2.31.1.linux-amd64.tar.gz
mkdir /Prometheus
tar zxf prometheus-2.31.1.linux-amd64.tar.gz -C /prometheus/
ln -s /prometheus/prometheus-2.31.1.linux-amd64/ /prometheus/Prometheus
3、启动
nohup /prometheus/prometheus/prometheus --config.file="/prometheus/prometheus/prometheus.yml" &
说明:
nohup和&后台运行,进程查看及终止
nohup
用途:不挂断地运行命令。
语法:nohup Command [ Arg … ] [ & ]
&
用途:在后台运行
一般两个一起用
nohup command &
3、访问
http://ip:9090
4、查看prometheus对本机的监控
http://localhost:9090/metrics
5、客户端的安装
下载软件地址:https://prometheus.io/download/#node_exporter
wget https://github.com/prometheus/node_exporter/releases/download/v1.3.0/node_exporter-1.3.0.linux-amd64.tar.gz
tar zxf node_exporter-1.3.0.linux-amd64.tar.gz -C /usr/local/
ln -s /usr/local/node_exporter-1.3.0.linux-amd64/ /usr/local/node_exporter
启动:
nohup /usr/local/node_exporter/node_exporter &
浏览器监控信息:
6、配置服务器对客户端进行数据采集
修改配置文件:
vi /prometheus/prometheus/prometheus.yml
文件末尾增加如下内容:
重启服务。
浏览器查看监控项
7、Grafana展示prometheus监控
Grafana安装方法这里不再叙述了,多张安装方法请查看以前的文章。
添加数据源:
添加dashboard:
Tags:grafana 安装
猜你喜欢
- 2024-12-06 企业级资源监控方案落地:Prometheus+Grafana+Export
- 2024-12-06 一文了解springboot+micrometer+prometheus+grafana监控系统
- 2024-12-06 Prometheus之Grafana可视化
- 2024-12-06 生产环境部署Loki+grafana+promtail
- 2024-12-06 性能测试之 grafana 监控平台
- 2024-12-06 Prometheus + Grafana监控搭建
- 2024-12-06 运维监控一样可以炫酷:Grafana展示Zabbix监控数据
- 2024-12-06 轻量级日志分析平台Loki实战
- 2024-12-06 Telegraf+Influxdb+Grafana 轻量级监控系统部署
- 2024-12-06 记录grafana整合zabbix实现美观度较高的可视化监控