Aggregate values in ElastAlert rules
<p>I need to write an ElastAlert rule that aggregates the values of events. The 'value' is one of fields in the ES document. 
For example, I need the total of all values, or the average.</p>

<p>I'm new to Python so was wondering if there are examples for such rules anywhere.</p>