> For the complete documentation index, see [llms.txt](https://song-jia-yang.gitbook.io/prometheus/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://song-jia-yang.gitbook.io/prometheus/readme.md).

# 前言

v0.1.0

在过去一年左右时间里，我们使用 Prometheus 完成了对几个机房的基础和业务监控，大大提高了服务质量以及 oncall 水平，在此特别感谢 Promethues 这样优秀的开源软件。

当初选择 Prometheus 并不是偶然，因为：

* Prometheus 是按照 Google SRE 运维之道的理念构建的，具有实用性和前瞻性。
* Prometheus 社区非常活跃，基本稳定在 1个月1个版本的迭代速度，从 2016 年 v1.01 开始接触使用以来，到目前发布的 v1.8.2 以及最新最新的 v2.1 ，你会发现 Prometheus 一直在进步、在优化。
* Go 语言开发，性能不错，安装部署简单，多平台部署兼容性好。
* 丰富的数据收集客户端，官方提供了各种常用 exporter。
* 丰富强大的查询能力。

Prometheus 作为监控后起之秀，虽然还有做的不够好的地方，但是不妨碍我们使用和喜爱它。根据我们长期的使用经验来看，它足以满足大多数场景需求，只不过对于新东西，往往需要花费更多力气才能发挥它的最大能力而已。

本书主要根据个人过去一年多的使用经验总结而成，内容主要包括 Prometheus 基本知识、进阶、实战以及常见问题列表等方面，希望对大家有所帮助。

本开源书籍既适用于具备基础 Linux 知识的运维初学者，也可供渴望理解 Prometheus 原理和实现细节的高级用户参考，同时也希望书中给出的实践案例在实际部署监控中对大家有所帮助。

你准备好了吗？接下来就让我们一起开始这段神奇旅行吧！

## 目录

* [前言](/prometheus/readme.md)
* [修订记录](/prometheus/revision-record.md)
* [如何贡献](/prometheus/how-to-contribute.md)
* [Prometheus 简介](/prometheus/introduction.md)
  * [Prometheus 是什么](/prometheus/introduction/what.md)
  * [为什么选择 Prometheus](/prometheus/introduction/why.md)
* [Prometheus 安装](/prometheus/install.md)
  * [二进制包安装](/prometheus/install/binary.md)
  * [Docker 安装](/prometheus/install/docker.md)
* [基础概念](/prometheus/concepts.md)
  * [数据模型](/prometheus/concepts/data-model.md)
  * [指标类型](/prometheus/concepts/metric-types.md)
  * [作业与实例](/prometheus/concepts/jobs-and-instances.md)
* [PromQL](/prometheus/promql.md)
  * [PromQL 基本使用](/prometheus/promql/summary.md)
  * [与 SQL 对比](/prometheus/promql/sql.md)
* [数据可视化](/prometheus/visualiztion.md)
  * [Web Console](/prometheus/visualiztion/console.md)
  * [Grafana](/prometheus/visualiztion/grafana.md)
* [Prometheus 配置](/prometheus/configuration.md)
  * [全局配置](/prometheus/configuration/global.md)
  * [告警配置](/prometheus/configuration/alerting.md)
  * [规则配置](/prometheus/configuration/rule_files.md)
  * [数据拉取配置](/prometheus/configuration/scrape_configs.md)
  * [远程可写存储](/prometheus/configuration/remote_write.md)
  * [远程可读存储](/prometheus/configuration/remote_read.md)
  * [服务发现](/prometheus/configuration/server_discovery.md)
  * [配置样例](/prometheus/configuration/demo.md)
* [服务发现](https://github.com/songjiayang/prometheus_practice/blob/master/sd/README.md)
  * [静态服务发现](/prometheus/optimize/logger.md)
  * [文件服务发现](/prometheus/fu-wu-fa-xian/consul.md)
  * [HTTP服务发现](/prometheus/demo/alertmanager.md)
  * [Consul服务发现](/prometheus/fu-wu-fa-xian/moby.md)
  * [moby服务发现](/prometheus/rule/what.md)
  * [kubernetes服务发现](/prometheus/alertmanager/others.md)
* [Exporter](/prometheus/exporter.md)
  * [文本格式](/prometheus/exporter/text.md)
  * [Sample Exporter](/prometheus/exporter/sample.md)
  * [Node Exporter 安装使用](/prometheus/exporter/nodeexporter.md)
  * [Node Exporter 常用查询](/prometheus/exporter/nodeexporter_query.md)
  * [其他 Exporter 介绍](/prometheus/exporter/other.md)
* [Pushgateway](/prometheus/pushgateway.md)
  * [Pushgateway 是什么](/prometheus/pushgateway/why.md)
  * [如何使用 Pushgateway](/prometheus/pushgateway/how.md)
* [数据存储](/prometheus/rule.md)
  * [Local Store](/prometheus/optimize/config.md)
  * [Remote Store](/prometheus/demo/rule.md)
* [告警/记录规则](/prometheus/demo/target.md)
  * [如何配置](/prometheus/alertmanager/webhooks.md)
  * [触发逻辑](/prometheus/container.md)
* [Alertmanager](/prometheus/alertmanager.md)
  * [Alertmanager 是什么](/prometheus/alertmanager/what.md)
  * [配置详情](/prometheus/alertmanager/config.md)
  * [通过 Email 接收告警](/prometheus/alertmanager/email.md)
  * [通过企业微信接收告警](/prometheus/alertmanager/wechat.md)
  * [通过 Slack 接收告警](/prometheus/alertmanager/slack.md)
  * [通过 Webhook 接收告警](/prometheus/container/k8s.md)
  * [其他告警接收方案](/prometheus/qa.md)
* [Prometheus 工具](/prometheus/demo.md)
  * [Promtool 介绍和使用](/prometheus/tools/client.md)
  * [Client SDK](/prometheus/optimize.md)
* [Prometheus 性能调优](/prometheus/store/remote.md)
  * [Metrics 仪表盘](/prometheus/tools.md)
  * [启动参数优化](/prometheus/fu-wu-fa-xian/static.md)
  * [日志查询](/prometheus/store.md)
* [Prometheus 与容器](/prometheus/rule/config.md)
  * [Docker](/prometheus/container/docker.md)
  * [Kubernetes](/prometheus/fu-wu-fa-xian/k8s.md)
* [高可用方案探讨](/prometheus/ha.md)
  * [Prometheus Server 的高可靠](/prometheus/ha/prometheus.md)
  * [AlertManager 的高可靠](/prometheus/qa/auth.md)
* [实战练习](/prometheus/fu-wu-fa-xian/http.md)
  * [NodeExporter](/prometheus/fu-wu-fa-xian/file.md)
  * [配置告警规则](/prometheus/demo/grafana.md)
  * [Grafana 集成](/prometheus/optimize/status.md)
  * [Alertmanager 告警](/prometheus/store/local.md)
* [常见问题收录](/prometheus/tools/promu.md)
  * [如何热加载新配置](/prometheus/qa/hotreload.md)
  * [如何通过认证后拉取数据](/prometheus/ha/alertmanger.md)

## 技术交流

欢迎加入 Prometheus 技术交流微信群，分享 Prometheus 资源，交流 Prometheus 技术。

* 微信群：![weixin.jpeg](https://user-images.githubusercontent.com/1459834/177047283-e60ce419-e499-42d8-89d5-f378b8bccbea.jpeg)

## 关于作者

* small\_fish\_\_

  * [微博](https://weibo.com/songjiayang1)
  * [github](https://github.com/songjiayang)
  * 个人公众号

  <img src="https://git.io/vAQvJ" alt="人人都懂云原生" data-size="original">
* 薛锦

  * [微博](https://weibo.com/1660913012/profile?topnav=1\&wvr=6)
  * [github](https://github.com/csxuejin)
  * 个人公众号

  <img src="https://songjiayang.gitbooks.io/go-basic-courses/content/pics/easy-hacking.jpg" alt="GitHub Logo" data-size="original">
