使用statsd和石墨收到的未知数量的指标 [英] Unknown number of metrics received with statsd and graphite

查看:96
本文介绍了使用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和石墨收到的未知数量的指标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆