문제

I'm using Graphite and Carbon-cache and trying to understand why it doesn't appear to be applying aggregation to data.

I have a whipser database:

whisper-create.py  /opt/graphite/storage/whisper/test/test.wsp 60:1y

From the metadata I am using an average aggregation method:

Meta data:
  aggregation method: average
  max retention: 31536000
  xFilesFactor: 0.5

And I am writing two values to it:

echo "test.test 1 `date +%s`" | nc localhost 2003; 
echo "test.test 100 `date +%s`" | nc localhost 2003; 

When I look at my whisper databse I see the following value:

42: 1395315780,        100

I would have expected this value to be 100+1 / 2 = 50.5

It appears to be using the last value, rather than an average of the two values.

I feel like I may be missing something here. Could anyone explain?

도움이 되었습니까?

해결책

The answer was to use the carbon-aggregator, not the carbon-cache.

The carbon-cache will always replace the value, no matter what. If time per point is 1 second and you send more than one value within a second then the last value is what will be stored.

If you want more than one value to be kept you need to use the carbon-aggregator (running on a different port) and configure how it should aggregate the data (sum, average).

다른 팁

I had the same problem and no access on the graphite / whisper settings. There is another solution. Aggregate data externally and the send it to graphite data port. https://github.com/floringavrila/graphite-feeder

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top