【问题标题】:How to store data in Graphite with retention of 100ms?如何在保留 100 毫秒的 Graphite 中存储数据?
【发布时间】:2019-02-20 08:15:57
【问题描述】:

我正在使用石墨来显示我们的应用程序统计信息。

storage-schemas.conf

[stats]
pattern = ^stats\.
retentions = 1s:1h,1m:1d,1h:100d

storage-aggregation.conf

[stats]
pattern = ^stats.*
xFilesFactor = 0
aggregationMethod = sum

每秒我发送数据 100 次。

使用上面的配置,它每秒只取一个值。

我想将一秒钟内发送的所有 100 个值相加,并在那一秒存储它们。

如何在石墨中聚合这些数据?

我尝试将保留时间设置为 0.01s:1h,但它不起作用。

有没有办法每 100 毫秒存储一次数据?

我到处搜索,但没有找到合适的解决方案。

【问题讨论】:

    标签: graphite graphite-carbon whisper


    【解决方案1】:

    正确的解决方案是将 Graphite 与 StatsD 一起使用。 StatsD 汇总您的不规则/高分辨率数据并定期发送到 Graphite。

    请记住,您必须更改客户端以将数据发送到 statsd 而不是石墨。

    您可以从这里找到更多信息:https://github.com/statsd/statsd

    如果您有大量指标,我建议您使用 C 版本 https://github.com/statsite/statsite

    【讨论】:

      猜你喜欢
      • 2020-12-12
      • 2015-06-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多