# prometheus-series **Repository Path**: xh-assembly/prometheus-series ## Basic Information - **Project Name**: prometheus-series - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-10-29 - **Last Updated**: 2021-11-07 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Prometheus 相关 # 基础 官网:[https://prometheus.io/](https://prometheus.io/) 下载页: [https://prometheus.io/download/](https://prometheus.io/download/) 下载地址: [https://github.com/prometheus/prometheus/releases/download/v2.31.0-rc.1/prometheus-2.31.0-rc.1.linux-amd64.tar.gz](https://github.com/prometheus/prometheus/releases/download/v2.31.0-rc.1/prometheus-2.31.0-rc.1.linux-amd64.tar.gz) prometheus 架构介绍 1. Prometheus 的核心就是 Prometheus server 2. Prometheus 的数据来源 1. 从服务器 exporters(暴露) 的数据里面抓取(pull),类似于抓取日志 2. Pushgateway,客户端通过脚本等方法推送数据到 Pushgateway,然后 Prometheus 从 Pushgateway pull 数据(Pushgateway 相当于中间队列) 3. Prometheus 支持服务的自动发现(Service Discovery),包括 DNS,k8s,consul,file 4. 告警(Alertmanager): 邮件,钉钉,微信等 5. 时序数据库,默认保存两个月 部署: 1. 下载: prometheus-2.31.0-rc.1.linux-amd64.tar.gz, 下载地址: [https://github.com/prometheus/prometheus/releases/download/v2.31.0-rc.1/prometheus-2.31.0-rc.1.linux-amd64.tar.gz](https://github.com/prometheus/prometheus/releases/download/v2.31.0-rc.1/prometheus-2.31.0-rc.1.linux-amd64.tar.gz) 2. 解压 ``` tar xvfz prometheus-*.tar.gz cd prometheus-* ``` 3. 配置文件是: `prometheus.yml` 4. 启动: ``` 先创建本地数据存储目录 # Start Prometheus. # By default, Prometheus stores its database in ./data (flag --storage.tsdb.path). # ./prometheus --config.file=prometheus.yml ./prometheus --storage.tsdb.path=./data --config.file=./prometheus.yml ``` 5. 访问 http://127.0.0.1:9090 Prometheus 接入 grafana grafana grafana 官网 : [https://grafana.com/](https://grafana.com/) wget https://dl.grafana.com/enterprise/release/grafana-enterprise-8.2.2.linux-amd64.tar.gz tar -zxvf grafana-enterprise-8.2.2.linux-amd64.tar.gz ./bin/grafana-server start 访问: http://127.0.0.1:3000 默认用户名 密码 admin/admin 然后设置新密码: 123456 prometheus 部署 Prometheus 配置文件介绍 PromQL 介绍 部署 grafana 及接入 prometheus 告警模块 alertermanager 部署 prometheus 告警实战 Prometheus 企业监控案例 Prometheus pushgaway 介绍 Prometheus 自动化监控 Prometheus 远端存储