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

An aggregate namespace who write data to it #2194

Closed
ning1875 opened this issue Mar 6, 2020 · 3 comments
Closed

An aggregate namespace who write data to it #2194

ning1875 opened this issue Mar 6, 2020 · 3 comments
Assignees

Comments

@ning1875
Copy link

ning1875 commented Mar 6, 2020

here is my usage :promethues remote write to m3coordinator then write to m3dbnode 。And my question is that : Is it written to m3db after m3coordinator aggregation, or is it aggregated by m3db itself?

@ning1875 ning1875 changed the title a aggregate names who write data to it A aggregate namespace who write data to it Mar 6, 2020
@ning1875 ning1875 changed the title A aggregate namespace who write data to it An aggregate namespace who write data to it Mar 6, 2020
@arnikola
Copy link
Collaborator

It is aggregated in m3coordinator, and sent to aggregated namespaces in the dbnode

@ning1875
Copy link
Author

ning1875 commented Mar 12, 2020

It is aggregated in m3coordinator, and sent to aggregated namespaces in the dbnode
ok,get .

I have been looking at the code of m3coordinator recently, some places are not very understandable。
- namespace: metrics
type: aggregated
retention: 720h
resolution: 5m
If an aggregated namespace is specified in the configuration file like above. Does m3coordinator write all the aggregated results to m3dbnode, such as avg, last, max, min, or just write last? if all agg result has been written to dbnode ,how to query max ,min by query ? add a method tag like agg_type="max" ?
here are my understanding of how m3coordinator write to dbnode

consumeLocalMetric

func (e *GaugeElem) Consume(

-->consum -->processValueWithAggregationLock
func (e *GaugeElem) processValueWithAggregationLock(

then finally call this to write to dbnode
err = w.handler.storage.Write(w.ctx, &storage.WriteQuery{

@robskillington
Copy link
Collaborator

robskillington commented Jul 9, 2020

Hey @ning1875 apologies for getting back to you late.

So right now by default the aggregation is always "last" value, you can use mapping rules to choose different aggregations:
https://docs.m3db.io/operational_guide/mapping_rollup/

This PR will then allow for adding tags per mapping rule so you can differentiate them as you need #2414.

We'll update the docs on this to make more clear.

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

No branches or pull requests

3 participants