CentOS下部署Prometheus

Prometheus介绍

Prometheus是一个开源的系统监控和报警的工具包,最初由SoundCloud发布。

官方网址:https://prometheus.io/
软件下载:https://prometheus.io/download/
GitHub:https://github.com/prometheus/prometheus
Github Release:https://github.com/prometheus/prometheus/releases/
Prometheus Exporters:https://prometheus.io/docs/instrumenting/exporters/

特点:

  • 多维数据模型(有metric名称和键值对确定的时间序列)
  • 灵活的查询语言
  • 不依赖分布式存储
  • 通过pull方式采集时间序列,通过http协议传输
  • 支持通过中介网关的push时间序列的方式
  • 监控数据通过服务或者静态配置来发现
  • 支持图表和dashboard等多种方式

组件:

  • Prometheus 主程序,主要是负责存储、抓取、聚合、查询方面
  • Alertmanager 程序,主要是负责实现报警功能
  • Pushgateway 程序,主要是实现接收由Client push过来的指标数据,在指定的时间间隔,由主程序来抓取
  • *_exporter 这类是不同系统已经实现了的集成

Prometheus部署

(1)安装及配置

# tar -zxf prometheus-2.11.1.linux-amd64.tar.gz -C /usr/local/
# mv /usr/local/prometheus-2.11.1.linux-amd64 /usr/local/prometheus
# cd /usr/local/prometheus
# vim prometheus.yml
scrape_interval: 15s   # 默认15秒到目标处抓取数据

(2)启动

nohup ./prometheus --config.file=prometheus.yml &
nohup ./prometheus --config.file=prometheus.yml --web.enable-lifecycle &
curl -s -XPOST localhost:9090/-/reload

(3)WEB页面访问:http://localhost:9090/ ,可以看到Prometheus的graph页面

上一篇 InfluxDB + Jmeter + Grafana
下一篇 Prometheus + Grafana 使用 Node Exporter 监控主机
目录
文章列表
1 Redis 6 服务器集群搭建
Redis 6 服务器集群搭建
2
PHPMailer解决OpenCart发送邮件不成功
PHPMailer解决OpenCart发送邮件不成功
3
Swift UI - 日期选择控件(UIDatePicker)
Swift UI - 日期选择控件(UIDatePicker)
4
Android之Activity界面劫持反劫持
Android之Activity界面劫持反劫持
5
高中数学基础:数列与不等式
高中数学基础:数列与不等式
最新评论
一位WordPress评论者
一位WordPress评论者
2月12日
您好,这是一条评论。若需要审核、编辑或删除评论,请访问仪表盘的评论界面。评论者头像来自 Gravatar。