Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sum metric agg #235

Merged
merged 4 commits into from
May 5, 2020
Merged

Sum metric agg #235

merged 4 commits into from
May 5, 2020

Conversation

DWalker487
Copy link
Contributor

What does this do?

This adds support for the Elasticsearch Sum metric aggregator
https://www.elastic.co/guide/en/elasticsearch/reference/7.6/search-aggregations-metrics-sum-aggregation.html

Why is it a good idea?

This is one of the core elasticsearch metric aggregations, and is natively supported by Grafana.

Context

The need for this arose when wanting to combine multiple documents reporting at the same interval to generate a total. This metric can also be hidden, as per #231.

Questions

@dholbach
Copy link
Contributor

dholbach commented May 5, 2020

Can you please resolve the conflict in CHANGELOG.rst?

@dholbach dholbach merged commit 224252a into weaveworks:master May 5, 2020
@dholbach dholbach added this to the 0.5.6 milestone May 5, 2020
@dholbach
Copy link
Contributor

This seems to lead to #245 - do you think you can check?

[daniel@reef grafanalib ]$ python -c 'from grafanalib.elasticsearch import AverageMetricAgg; AverageMetricAgg().to_json_data()'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/daniel/dev/grafanalib/grafanalib/elasticsearch.py", line 78, in to_json_data
    'id': str(self.id),
AttributeError: 'AverageMetricAgg' object has no attribute 'id'
[daniel@reef grafanalib ]$ 

@DWalker487
Copy link
Contributor Author

Ah yes - I missed an instance where I set up a default id when splitting out commits into different PRs - I'll update this now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants