Setting multiple values with sum

Asked by Jens Rantil


When having a Whisper database with aggregationMethod=sum, will doing

my.event 1 1334217576
my.event 1 1334217576
my.event 1 1334217576

yield a value of 3 or value of 1 (ie. simply resetting the value)?

Question information

English Edit question
Graphite Edit question
No assignee Edit question
Solved by:
Michael Leinartas
Last query:
Last reply:
Revision history for this message
Best Michael Leinartas (mleinartas) said :

That example will result in a value of 1. The aggregationMethod setting only influences the way in which aggregations happen when points move from a higher resolution to a lower resolution at retention boundaries.

For instance, for a retention config of 10s:1d, 60s:7d (in storage-schemas.conf)

my.event 1 1334217480
my.event 1 1334217490
my.event 1 1334217500
my.event 1 1334217510
my.event 1 1334217520
my.event 1 1334217530

Will result in those 5 points being stored for 1 day. After 1 day, with aggregationMethod=sum, only this point will be available:
my.event 6 1334217480

With aggregationMethod=avg (the default), it will instead be
my.event 1 1334217480

In short, multiple points sent during the time bucket lining up with your highest resolution (say 1334217480 to 1334217489 seconds) will be overwritten and only the last one kept. If you need to do aggregation it should either be done by the sender or by an external process (statsd being the most common).

Revision history for this message
Jens Rantil (jens-rantil) said :

Ah, thanks!

Revision history for this message
Jens Rantil (jens-rantil) said :

Thanks Michael Leinartas, that solved my question.