问题标签 [prometheus]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
docker - 在 Grafana 中为 Docker 容器构建 CPU 使用率图
我已连接 cAdvisor -> Prometheus 和 Grafana 以获取我的 Docker 容器的图表。其中之一是 CPU 负载,但我现在只能看到累积使用线,而不是实际值。我很乐意看到 cAdvisor 展示的类似内容。这样做的方法是什么?
prometheus - 如何使用联合从多个 Prometheus 实例(每个使用 instance="localhost:9090")中收集 Prometheus 的指标
我们有多个在数据中心运行的 Prometheus 实例(我将它们称为 DC Prometheus 实例)和一个额外的 Prometheus 实例(我们在下文中将其称为“主”),我们通过以下方式从 DC Prometheus 实例中收集指标使用联合功能。
主要 Prometheus 正在从自身中抓取 {job='prometheus'} 值,但也从 DC Prometheus 实例(每个从 localhost:9090 中抓取)。
问题是主要普罗米修斯抱怨无序样本:
WARN[1585] 摄取无序样本时出错 numDropped=369 source=target.go:475 target=dc1-prometheus:443
我发现这是因为包含{job="prometheus"}
在 'match[]' 参数中。
我试图通过标签重新标记来解决这个问题,但是当我尝试使用单个 DC Prometheus 并不断更换时,我无法让它工作(我仍然遇到无序样本错误),而且我没有在使用多个目标时,甚至不知道用什么来代替。
我的问题是如何使用 relabel_configs 来摆脱乱序错误。我到处都在使用 Prometheus 0.17。
prometheus - prometheus 在警报注释中使用 html 内容并在电子邮件模板中使用它
所以我们的警报看起来像
电子邮件模板看起来像。
alertmanager.yml 看起来像
我们收到电子邮件,但内容不正确。
我们收到的邮件:
<b> data is label_value </b>
我们想要什么:
数据是标签值
所以我们想要的是html输出。
有人可以帮忙吗?
haproxy - 如何为mesos和HAProxy进程编写prometheus警报规则。?
我正在处理一项需要配置和验证 prometheus alertmanager 的任务。当 mesos 进程和 HAProxy 进程关闭时,用户应该得到警报,我试图在互联网上找到这些警报规则,但没有找到合适的。谁能告诉我如何为这些编写警报规则。基本上需要条件子句。
prometheus - 普罗米修斯的最后一刀
我已经配置了 Prometheus 和所有已配置端点的状态,即客户端已启动。所有作业的抓取间隔保持 5 秒。但是在“最后一次刮擦”列中检查时,我看到最后一次刮擦 1 小时几分钟。前。或几分钟。前。是不是意味着出事了。Prometheus 中的抓取是如何工作的。
谢谢。
python - Prometheus + simple time series + Python
I'm trying to build a simple time series database in prometheus. I'm looking at financial time series data, and need somewhere to store the data to quickly access via Python. I'm loading the data into the time series via xml or .csvs, so this isn't some crazy "lots of data in and out at the same time" kind of project. I'm the only user, and maybe have a couple others use it in time and just want something thats easy to load data into, and pull out of.
I was hoping for some guidance on how to do this. Few questions:
1) Is it simple to pull data from a prometheus database via python? 2) I wanted to run this all locally off my windows machine, is that doable? 3) Am I completely overengineering this? (My worry with SQL is that it would be a mess to work with, as its large time series data sets)
Thanks
prometheus - Prometheus 总是只选择第一个值
假设普罗米修斯每 10 秒从我的服务器中提取数据,并且我想要索引页面的加载时间图表,在这 10 秒期间,索引页面被加载了 3 次。我尝试了所有组合但无法使其工作,它总是选择第一个值。
我尝试将它作为摘要和直方图发送,它只选择了第一个值,我希望它选择所有值,或者至少插入它们的平均值。
prometheus - 将 Prometheus 抓取配置为在半小时发生
我有一个每小时开始的进程(在 python 中)。大约需要 20 分钟才能完成。我正在使用 Push Gateway 发送进程开始和结束的 prometheus 指标。
我创建了另一个脚本来生成有关流程的指标。但是,这些指标仅在 20 分钟的过程完成后才可用且相关。
我可以制作一个时间间隔为“每小时 30 分钟”的 scrape_config 吗?一个可比较的 cronjob 将是 "30 * * * *"
go - 如何使用 client_golang 将指标推送到 prometheus?
我还没有找到一些在 prometheus 中使用 Gauge、Counter 和 Histogram 的好例子。对此有任何帮助。我尝试使用文档,但无法成功创建工作应用程序。