使用statsd和石墨收到的未知数量的指标

编程入门 行业动态 更新时间:2024-10-22 18:35:13
本文介绍了使用statsd和石墨收到的未知数量的指标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在尝试收集有关石墨和碳守护进程性能的一些数据.对我而言,幸运的是,碳守护进程每60秒向石墨报告一次,并报告其工作状态等一些统计数据.

I'm trying to gather some data on the performance of graphite and the carbon daemon. Luckily for me the carbon daemon reports to graphite every 60 seconds with some stats on its workings such as the number of metrics received.

我正在使用 statsd 汇总统计信息并将其每秒刷新到Carbon守护程序,但在设置以显示在特定时间间隔内收到的指标数量时注意到一些奇怪的行为.我正在使用 grafana 连接到我的Graphite实例并从中提取数据. 每当statsd未运行并且我检查收到的度量标准数量时,它都保持为0,这并不奇怪,因为没有任何东西向它发送任何东西.但是,当我启动statsd时,该数字迅速上升到每分钟约800/900,而我没有向其发送任何统计信息,如下图所示:

I'm using statsd to aggregate stats and flush them to the carbon daemon every second, but noticed some weird behavior when setting up to show the number of metrics received in a certain time interval. I'm using grafana to connect to my Graphite instance and pull data out of it. Whenever statsd is not running and I inspect the number of metrics received it remains 0, which is not weird considering nothing is sending it anything. However, when I start statsd the number quickly rises to about 800/900 per minute without me sending any stats to it yet as can be seen in this image:

我不知道这些指标来自何处以及为什么它们以每秒15的速度发生.另外,每当我启动statsd时,CPU都会将负载增加大约10%. 我确实注意到的是,当我增加statsd的刷新间隔时,收到的指标数量会减少.

I'm at a loss as to where these metrics are coming from and why they happen at a rate of 15 per second. Also, the CPU increases the load by about 10% whenever I start statsd. What I did notice is that when I increase the flush interval of statsd the number of metrics received decreases.

这是我的statsd配置文件:

This is my configuration file of statsd:

{ graphitePort: 2003, graphiteHost: "127.0.0.1", port: 8125, backends: ["./backends/graphite"], flushInterval: 1000, // Don't increase this past the lowest retention schema of graphite prefixStats: "test", graphite: { legacyNamespace: false } }

这是我的石墨存储方案:

And here's my storage schema for graphite:

[carbon] pattern = ^carbon\. retentions = 60s:90d,300s:365d [stats] pattern = ^stats\..* retentions = 1:2160,10:2160,60:10080,600:262974 [system] pattern = ^system\..* retentions = 10:2160,60:10080,600:262974

推荐答案

Statsd将在每个时间间隔向碳报告相同数量的度量标准.命中多少个指标statsd都无关紧要,您每10或60秒就将同一组汇总的stats写入后端.

Statsd will report the same number of metrics into carbon every interval. It doesn't matter how many metrics statsd is hit with, you're writing the same group of aggregated stats every 10 or 60 seconds to the backend.

更多推荐

使用statsd和石墨收到的未知数量的指标

本文发布于:2023-10-27 11:28:38,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1533223.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:石墨   数量   指标   statsd

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!