![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
文档
云原生之家
这个作者很懒,什么都没留下…
展开
-
Prometheus使用Basic认证保护Prometheus API和UI端点
完整译文请访问:http://www.coderdocument.com/docs/prometheus/v2.14/guides/securing_prometheus_api_and_ui_endpoints_using_basic_auth.html。Prometheus不直接支持连接到Prometheus表达式浏览器和HTTP API的Basic认证。如果你希望对这些连接执行Basic...翻译 2019-12-17 17:42:16 · 3353 阅读 · 1 评论 -
Prometheus使用节点导出器监控Linux主机指标
完整译文请访问:http://www.coderdocument.com/docs/prometheus/v2.14/guides/monitoring_linux_host_metrics_with_node_exporter.html。Prometheus节点导出器暴露了大量与硬件和内核相关的指标。在本指南中,你将:在本地启动一个节点导出器; 在本地启动一个Prometheus实...翻译 2019-12-17 17:39:28 · 964 阅读 · 0 评论 -
Prometheus使用cAdvisor监控Docker容器指标
完整译文请访问:http://www.coderdocument.com/docs/prometheus/v2.14/guides/monitoring_docker_container_metrics_using_cadvisor.html。cAdvisor(container Advisor的缩写)分析并暴露正在运行的容器的资源使用和性能数据相关指标(Prometheus 指标格式)。在本...翻译 2019-12-17 17:36:01 · 2179 阅读 · 0 评论 -
Prometheus远程写调优
完整译文请访问:http://www.coderdocument.com/docs/prometheus/v2.14/best_practices/remote_write_tuning.html。Prometheus为远程写实现了健全的默认设置,但许多用户有不同的需求,希望优化远程写设置。此页描述了可用的远程写配置调优参数。远程写特点每个远程写目的地都启动一个队列,该队列从wri...翻译 2019-12-16 12:56:17 · 2082 阅读 · 1 评论 -
Prometheus何时使用Pushgateway
完整译文请访问:http://www.coderdocument.com/docs/prometheus/v2.14/best_practices/when_to_use_push_gateway.html。Pushgateway是一种中间服务,它允许你从不能被抓取的作业中推送指标。有关详细信息,请参见推送指标。我应该使用Pushgateway吗?我们只建议在某些有限的情况下使用Pus...翻译 2019-12-16 12:54:11 · 817 阅读 · 0 评论 -
Prometheus记录规则实践
完整译文请访问:http://www.coderdocument.com/docs/prometheus/v2.14/best_practices/recording_rules.html。使用记录规则的一致命名方案,易于解释规则含义,还可以避免错误,暴露错误的或无意义的计算。本文档记录了如何正确地进行聚合,并提供了一种命名约定。命名和聚合记录规则的一般形式为level:metr...翻译 2019-12-16 12:52:29 · 1097 阅读 · 1 评论 -
Prometheus告警实践
完整译文请访问:http://www.coderdocument.com/docs/prometheus/v2.14/best_practices/alerting.html。对什么告警目标是尽可能少地触发告警,通过关联终端用户痛点来触发告警,而不是试图捕捉所有可能触发告警的条件。告警应该链接到相关的控制台,以便于找出哪个组件有问题。可以对告警保持一定的宽容,以适应小幅波动。在线服...翻译 2019-12-16 12:49:54 · 962 阅读 · 0 评论 -
Prometheus直方图和摘要图
完整译文请访问:http://www.coderdocument.com/docs/prometheus/v2.14/best_practices/histogram_and_summary.html。直方图和摘要图是更复杂的指标类型。一个直方图或摘要图不仅会创建大量时间序列,而且正确使用这些指标类型也更加困难。本节将帮助你选择和配置合适的指标类型。库支持首先,检查库对直方图和摘要图的...翻译 2019-12-09 21:48:43 · 1581 阅读 · 0 评论 -
Prometheus控制台和仪表盘
完整译文请访问:http://www.coderdocument.com/docs/prometheus/v2.14/best_practices/consoles_and_dashboards.html。在仪表盘上显示尽可能多的数据是很吸引人的,特别是当像Prometheus这样的系统能够为你的应用程序提供如此丰富的监控手段时。这可能导致控制台由于拥有太多的信息而无法访问。不要试图展现每...翻译 2019-12-09 21:46:29 · 1263 阅读 · 0 评论 -
Prometheus添加监控
完整译文请访问:http://www.coderdocument.com/docs/prometheus/v2.14/best_practices/instrumentation.html。如何添加监控简而言之,就是为一切事物添加监控。每个库、子系统和服务都应该至少有一些指标,以便你了解它是如何执行的。添加监控应该是代码中不可或缺的一部分。在使用它们的同一个文件中实例化指标类。这使得在...翻译 2019-12-08 17:29:19 · 2297 阅读 · 0 评论 -
Prometheus指标和标签命名
完整译文请访问:http://www.coderdocument.com/docs/prometheus/v2.14/best_practices/metric_and_label_naming.html。在使用Prometheus时,不需要强制使用本文档中提供的指标和标签约定,但可以作为一种风格指南和最佳实践。个别组织可能希望以不同的方式处理其中一些实践,例如命名约定。指标名称一个指...翻译 2019-12-08 17:27:06 · 4670 阅读 · 0 评论 -
Prometheus编写导出器
完整译文请访问:http://www.coderdocument.com/docs/prometheus/v2.14/instrumenting/writing_exporters.html。如果你正为自己的代码添加监控,那么应该遵循使用Prometheus客户端库为代码添加监控的一般规则。当从另一个监控系统获取指标时,事情往往不是那么黑白分明。此文档包含编写导出器或自定义收集器时应该考虑...翻译 2019-12-05 15:48:15 · 663 阅读 · 0 评论 -
Prometheus暴露格式
完整译文请访问:http://www.coderdocument.com/docs/prometheus/v2.14/instrumenting/exposition_formats.html。指标可以使用简单的基于文本的暴露格式暴露给Prometheus。有各种各样的客户端库可以实现这种格式。如果你所使用的语言没有相应的客户端库,你可以创建自己的客户端库。注意:Prometheus的一些...翻译 2019-11-27 15:05:08 · 740 阅读 · 0 评论 -
Prometheus导出器与集成
完整译文请访问:http://www.coderdocument.com/docs/prometheus/v2.14/instrumenting/exporters_and_integrations.html。有许多库和服务器可以帮助从第三方系统导出现有的指标,如Prometheus指标。这对于无法使用Prometheus指标直接添加监控的系统非常有用(例如,HAProxy或Linux系统统计...翻译 2019-11-27 15:03:00 · 1316 阅读 · 0 评论 -
Prometheus推送指标
完整译文请访问:http://www.coderdocument.com/docs/prometheus/v2.14/instrumenting/pushing_metrics.html。有时你需要监视不能被抓取的组件。Prometheus Pushgateway允许你将时间序列从短期存活的服务级别的批处理作业推送至Prometheus可以获取的中间作业。结合Prometheus简单的基于文本...翻译 2019-11-26 21:10:32 · 1059 阅读 · 0 评论 -
Prometheus客户端库
完整译文请访问:http://www.coderdocument.com/docs/prometheus/v2.14/instrumenting/client_libraries.html。在监控服务之前,你需要通过Prometheus客户端库将检测添加到他们的代码中。Prometheus指标类型有这些。选择与应用程序编写语言相匹配的Prometheus客户端库。你可以通过HTTP端点定义...翻译 2019-11-26 17:37:10 · 1044 阅读 · 0 评论 -
Prometheus告警管理API
完整译文请访问:http://www.coderdocument.com/docs/prometheus/v2.14/alerting/management_api.html。Alertmanager提供了一组管理API来简化自动化和集成。Alertmanager提供了一组管理API来简化自动化和集成。健康检查GET /-/healthy此端点始终返回200,应该用于检查Al...翻译 2019-11-24 20:25:15 · 2103 阅读 · 0 评论 -
Prometheus通知模板示例
完整译文请访问:http://www.coderdocument.com/docs/prometheus/v2.14/alerting/notification_template_examples.html。以下是告警和相应的Alertmanager配置文件设置(alertmanager.yml)的所有差异的示例。每个都使用Go模板系统。自定义Slack通知在这个例子中,我们自定义Sl...翻译 2019-11-24 20:22:50 · 546 阅读 · 0 评论 -
Prometheus通知模板参考
完整译文请访问:http://www.coderdocument.com/docs/prometheus/v2.14/alerting/notification_template_reference.html。Prometheus创建并向Alertmanager发送告警,Alertmanager根据标签向不同的接收者发送通知。接收者可以是许多集成中的一个,包括:Slack、PagerDuty、...翻译 2019-11-24 20:20:27 · 703 阅读 · 0 评论 -
Prometheus发送告警
完整译文请访问:http://www.coderdocument.com/docs/prometheus/v2.14/alerting/sending_alerts.html。免责声明:Prometheus自动负责发送由其配置的告警规则生成的告警。强烈建议在Prometheus中基于时间序列数据配置告警规则,而不是实现一个直接的客户端。Alertmanager有两个版本的API, v1和v...翻译 2019-11-24 20:18:00 · 1359 阅读 · 0 评论 -
Prometheus Alertmanager配置
完整译文请访问:http://www.coderdocument.com/docs/prometheus/v2.14/alerting/configuration.html。Alertmanager是通过命令行选项和配置文件配置的。虽然命令行选项配置不可变的系统参数,但配置文件定义了抑制规则、通知路由和通知接收者。可视化编辑器可以帮助构建路由树。要查看所有可用的命令行选项,请运行:a...翻译 2019-11-24 20:16:04 · 471 阅读 · 0 评论 -
Prometheus Alertmanager
完整译文请访问:http://www.coderdocument.com/docs/prometheus/v2.14/operating/security_model.html。Alertmanager处理客户端应用程序(如Prometheus服务器)发送的告警。它负责删除、分组和将它们路由到正确的接收方,如电子邮件、PagerDuty或OpsGenie。它还负责保持告警的静默和抑制。下面...翻译 2019-11-24 20:13:46 · 178 阅读 · 0 评论 -
Prometheus告警概述
完整译文请访问:http://www.coderdocument.com/docs/prometheus/v2.14/alerting/alerting_overview.html。Prometheus分为两部分。Prometheus服务器中的告警规则向Alertmanager发送告警。然后,Alertmanager管理这些告警,包括静默、抑制、聚合和通过电子邮件、随叫随到通知系统和聊天平台等...翻译 2019-11-24 20:11:30 · 312 阅读 · 0 评论 -
Prometheus安全模型
完整译文请访问:http://www.coderdocument.com/docs/prometheus/v2.14/operating/security_model.html。Prometheus是一个复杂的系统,有许多组件并与其他系统集成。它可以部署在各种受信任和不受信任的环境中。本页描述Prometheus的一般安全假设和一些可以通过配置启用的攻击向量。对于任何复杂的系统,都不可...翻译 2019-11-23 12:25:53 · 496 阅读 · 0 评论 -
Prometheus集成
完整译文请访问:http://www.coderdocument.com/docs/prometheus/v2.14/operating/integrations.html。除了客户端库和导出器以及相关的库之外,Prometheus还有许多其他的通用集成点。本页列出了其中一些集成点。并不是所有的集成都列在这里,因为功能重叠或仍在开发中。导出器默认端口wiki页面还包含了一些符合这些类别的非...翻译 2019-11-23 12:22:58 · 317 阅读 · 0 评论 -
Prometheus控制台模板
完整译文请访问:http://www.coderdocument.com/docs/prometheus/v2.14/visualization/console_templates.html。控制台模板允许使用Go模板语言创建任意控制台。这些是由Prometheus服务器提供的。控制台模板是创建可以在源代码控制中轻松管理的模板的最强大的方法。这有一个学习曲线,所以使用这种类型监控的新用户应...翻译 2019-11-22 13:19:30 · 778 阅读 · 0 评论 -
Prometheus Grafana
完整译文请访问:http://www.coderdocument.com/docs/prometheus/v2.14/visualization/grafana.html。Grafana支持查询Prometheus。从Grafana v2.5.0(2015-10-28)开始包含Prometheus数据源。以下是Grafana仪表盘查询Prometheus数据的例子:安装要安装G...翻译 2019-11-22 13:17:05 · 98 阅读 · 0 评论 -
Prometheus表达式浏览器
完整译文请访问:http://www.coderdocument.com/docs/prometheus/v2.14/visualization/expression_browser.html。表达式浏览器可在Prometheus服务器的/graph端点上获取,允许你输入任何表达式,并随时间以表格或图表的形式查看其结果。这对于特别的查询和调试非常有用。对于图形绘制,使用Grafana或控制...翻译 2019-11-22 13:14:49 · 417 阅读 · 0 评论 -
Prometheus HTTP API
完整译文请访问:http://www.coderdocument.com/docs/prometheus/v2.14/prometheus/querying/http_api.html。当前稳定的HTTP API可以在Prometheus服务器上的/api/v1下访问。所有非破坏性的API都将被添加到该端点下。格式概览API响应格式是JSON。每个成功的API请求都返回一个2xx状态...翻译 2019-11-21 22:19:06 · 1553 阅读 · 0 评论 -
Prometheus函数
完整译文请访问:http://www.coderdocument.com/docs/prometheus/v2.14/prometheus/querying/functions.html。有些函数有默认参数,例如year(v=vector(time()) instant-vector)。这意味着有一个参数v是一个瞬时向量,如果不提供参数v,则其默认值为vector(time())。abs...翻译 2019-11-20 22:34:56 · 1114 阅读 · 0 评论 -
Prometheus运算符
完整译文请访问:http://www.coderdocument.com/docs/prometheus/v2.14/prometheus/querying/operators.html。二元运算符Prometheus的查询语言支持基本的逻辑运算符和算术运算符。对于两个瞬时向量之间的操作,可以修改匹配行为。算术二元运算符Prometheus中存在以下二元算术运算符:+(加)...翻译 2019-11-19 11:13:39 · 1988 阅读 · 0 评论 -
查询Prometheus
完整译文请访问:http://www.coderdocument.com/docs/prometheus/v2.14/prometheus/querying/query_prometheus.html。Prometheus提供了一种名为PromQL (Prometheus查询语言)的函数式查询语言,使用户能够实时选择和聚合时间序列数据。表达式的结果可以以图形的形式显示,也可以在Promethe...翻译 2019-11-18 13:15:07 · 1525 阅读 · 0 评论 -
Prometheus API稳定性保证
完整译文请访问:http://www.coderdocument.com/docs/prometheus/v2.14/prometheus/api_stability_guarantees.html。Prometheus承诺API在主版本中保持稳定,并努力避免破坏关键特性的变化。一些cosmetic功能,仍在开发中,或依赖于第三方服务,不包括在此。如下内容在2.x版本中是稳定的:查询语...翻译 2019-11-17 20:41:01 · 264 阅读 · 0 评论 -
Prometheus 2.0迁移指南
完整译文请访问:http://www.coderdocument.com/docs/prometheus/v2.14/prometheus/prometheus_2.0_migration_guide.html。与我们的稳定性承诺一致,Prometheus 2.0版本包含了许多向后不兼容的变化。本文档提供了从Prometheus1.8迁移到Prometheus2.0的指导。选项Prom...翻译 2019-11-17 20:38:49 · 1021 阅读 · 0 评论 -
Prometheus管理API
完整译文请访问:http://www.coderdocument.com/docs/prometheus/v2.14/prometheus/management_api.html。Prometheus提供了一套管理API来简化自动化和集成。健康检查GET /-/healthy这个端点总是返回200,应该用来检查Prometheus的健康状况。就绪检查GET /-/rea...翻译 2019-11-17 20:35:34 · 2625 阅读 · 0 评论 -
Prometheus联邦
完整译文请访问:http://www.coderdocument.com/docs/prometheus/v2.14/prometheus/federation.html。联邦允许Prometheus服务器从另一个Prometheus服务器上抓取选定的时间序列。使用场景联邦有不同的使用场景。通常,它用于实现可伸缩的Prometheus监控,或将一个服务相关指标从一个Prometheus...翻译 2019-11-17 16:35:21 · 441 阅读 · 0 评论 -
Prometheus存储
完整译文请访问:http://www.coderdocument.com/docs/prometheus/v2.14/prometheus/storage.html。Prometheus包含一个本地磁盘上的时间序列数据库,但也可以与远程存储系统集成。本地存储Prometheus的本地时间序列数据库将时间序列数据以自定义格式存储在磁盘上。磁盘布局摄入的采样每两个小时被分成一个bl...翻译 2019-11-17 14:13:34 · 518 阅读 · 0 评论 -
Prometheus规则的单元测试
完整译文请访问:http://www.coderdocument.com/docs/prometheus/v2.14/prometheus/configuration/unit_testing_for_rules.html。你可以使用promtool来测试你的规则。# For a single test file../promtool test rules test.yml# If ...翻译 2019-11-17 11:08:24 · 459 阅读 · 0 评论 -
Prometheus模板参考
完整译文请访问:http://www.coderdocument.com/docs/prometheus/v2.14/prometheus/configuration/template_reference.html。Prometheus支持模板化告警的注解和标签以及服务控制台页面。模板能够对本地数据库运行查询、遍历数据、使用条件、格式化数据等等。Prometheus模板语言基于Go模板系统。...翻译 2019-11-17 11:06:05 · 808 阅读 · 0 评论 -
Prometheus模板示例
完整译文请访问:http://www.coderdocument.com/docs/prometheus/v2.14/prometheus/configuration/template_examples.html。Prometheus支持模板化告警的注解和标签以及服务控制台页面。模板能够对本地数据库运行查询、遍历数据、使用条件、格式化数据等等。Prometheus模板语言基于Go模板系统。...翻译 2019-11-16 21:38:35 · 1197 阅读 · 0 评论