简体   繁体   English

如何在保留100ms的Graphite中存储数据?

[英]How to store data in Graphite with retention of 100ms?

I am using graphite to display our application stats. 我正在使用石墨来显示我们的应用程序统计信息。

storage-schemas.conf 存储schemas.conf

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

storage-aggregation.conf 存储aggregation.conf

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

Per second I am sending data 100 times. 每秒我发送数据100次。

With the above configuration, it is taking only one value every second. 通过上述配置,每秒仅取一个值。

I want to sum all the 100 values sent in a second and store them at that second. 我想对一秒钟内发送的所有100个值求和,并在那一刻存储它们。

How can I aggregate this data in graphite? 如何在石墨中汇总这些数据?

I tried to set retention to 0.01s:1h but its not working. 我试图将保留时间设置为0.01s:1h,但是它不起作用。

Is there any way to store data every 100 ms? 每100毫秒有什么方法可以存储数据吗?

I searched everywhere but didn't find a proper solution. 我到处搜索,但找不到合适的解决方案。

The proper solution will be using Graphite together with StatsD. 正确的解决方案是将Graphite与StatsD一起使用。 StatsD aggregates your irregular / high resolution data and sending to Graphite regularly. StatsD会汇总您的不规则/高分辨率数据并定期发送到Graphite。

Keep in mind, you have to change your client side to send data to statsd instead of graphite. 请记住,您必须更改客户端以将数据发送到statsd而不是石墨。

You can find more information from here: https://github.com/statsd/statsd 您可以从此处找到更多信息: https : //github.com/statsd/statsd

If you have high number of metrics I recommend using C version of it https://github.com/statsite/statsite 如果您有大量指标,建议您使用C版本的https://github.com/statsite/statsite

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM