Re: Extend HTTP Endpoint to allow querying for metric types

2016-07-06 Thread Tuan-Anh Hoang-Vu
I am currently working on this. Could someone assign me this JIRA issue? https://issues.apache.org/jira/browse/MESOS-5731 On Tue, Jun 28, 2016 at 10:43 AM, Tuan-Anh Hoang-Vu wrote: > Sounds great! I'll spend time working on this. > > On Mon, Jun 27, 2016 at 10:41 PM, Vinod Kone wrote: > >> v1

Re: Extend HTTP Endpoint to allow querying for metric types

2016-06-28 Thread Tuan-Anh Hoang-Vu
Sounds great! I'll spend time working on this. On Mon, Jun 27, 2016 at 10:41 PM, Vinod Kone wrote: > v1 API is not yet declared stable, so we can make changes before 1.0. > > On Mon, Jun 27, 2016 at 10:10 PM, Tuan-Anh Hoang-Vu > wrote: > > > Hi Vinod, > > > > Yes! That will also works! My only

Re: Extend HTTP Endpoint to allow querying for metric types

2016-06-27 Thread Vinod Kone
v1 API is not yet declared stable, so we can make changes before 1.0. On Mon, Jun 27, 2016 at 10:10 PM, Tuan-Anh Hoang-Vu wrote: > Hi Vinod, > > Yes! That will also works! My only concern is will this break backward > compatibility? > Would this be something worth pushing upstream? > > On Mon, J

Re: Extend HTTP Endpoint to allow querying for metric types

2016-06-27 Thread Tuan-Anh Hoang-Vu
Hi Vinod, Yes! That will also works! My only concern is will this break backward compatibility? Would this be something worth pushing upstream? On Mon, Jun 27, 2016 at 6:39 PM, Vinod Kone wrote: > I was thinking more along the lines of : > > ``` > GetMetrics { > repeated Metric gauges = 1; >

Re: Extend HTTP Endpoint to allow querying for metric types

2016-06-27 Thread Vinod Kone
I was thinking more along the lines of : ``` GetMetrics { repeated Metric gauges = 1; repeated Metric counters = 2; } ``` On Mon, Jun 27, 2016 at 6:27 PM, Tuan-Anh Hoang-Vu wrote: > Timer will simply measure the amount of time it takes (in ns) for an > operation. > > On Mon, Jun 27, 2016 at

Re: Extend HTTP Endpoint to allow querying for metric types

2016-06-27 Thread Tuan-Anh Hoang-Vu
Timer will simply measure the amount of time it takes (in ns) for an operation. On Mon, Jun 27, 2016 at 6:14 PM, Benjamin Mahler wrote: > What is the timer type? Is it effectively a special case of a histogram? > > On Mon, Jun 27, 2016 at 5:34 PM, Tuan-Anh Hoang-Vu > wrote: > > > Hi Benjamin, >

Re: Extend HTTP Endpoint to allow querying for metric types

2016-06-27 Thread Benjamin Mahler
What is the timer type? Is it effectively a special case of a histogram? On Mon, Jun 27, 2016 at 5:34 PM, Tuan-Anh Hoang-Vu wrote: > Hi Benjamin, > > We used an in-house metrics system, which is basically a time-series > database. > I don't know in details about the metrics system, but the colle

Re: Extend HTTP Endpoint to allow querying for metric types

2016-06-27 Thread Tuan-Anh Hoang-Vu
Hi Vinod, I checked the corresponding master code [1] and also the v1 api response for GET_METRICS call. Do you suggest adding another field called `type` or something into the result, so instead of { "name": "master/cpus_total", "value": 0.0 } we have { "name": "master/cpus_total",

Re: Extend HTTP Endpoint to allow querying for metric types

2016-06-27 Thread Tuan-Anh Hoang-Vu
Hi Benjamin, We used an in-house metrics system, which is basically a time-series database. I don't know in details about the metrics system, but the collection client required me to specify metric type, probably for optimization purpose. It accepts 3 different types: counter, gauge and timer On

Re: Extend HTTP Endpoint to allow querying for metric types

2016-06-27 Thread Vinod Kone
We can definitely distinguish counters and gauges in the upcoming v1 API. https://github.com/apache/mesos/blob/master/include/mesos/v1/master/master.proto#L265 On Mon, Jun 27, 2016 at 5:09 PM, Benjamin Mahler wrote: > It's worth doing because it has come up before [1] [2]. For our own > educa

Re: Extend HTTP Endpoint to allow querying for metric types

2016-06-27 Thread Benjamin Mahler
It's worth doing because it has come up before [1] [2]. For our own education, in your case why is the metrics collection system interested in the type? Is it for optimization? Which metrics collection system are you using? What are the types that the metrics collection system understands? The typ

Re: Extend HTTP Endpoint to allow querying for metric types

2016-06-27 Thread Tuan-Anh Hoang-Vu
Hi Vinod, Yes, my metric collection system need to distinguish between different metrics. Currently we hard coded all metric types into our system, but it's not very scalable and error prone. For example I recently discovered that we misclassified `timestamp` as gauge instead of counter. On Mon,

Re: Extend HTTP Endpoint to allow querying for metric types

2016-06-27 Thread Vinod Kone
Hey Tuan. Can I ask what you are trying to accomplish here? Does your metric collection system need to distinguish between different metrics? On Mon, Jun 27, 2016 at 10:35 AM, Tuan-Anh Hoang-Vu wrote: > Hello, > > I am planning to extend current metrics endpoint (/metrics/snapshot) to > only > r

Extend HTTP Endpoint to allow querying for metric types

2016-06-27 Thread Tuan-Anh Hoang-Vu
Hello, I am planning to extend current metrics endpoint (/metrics/snapshot) to only return a specific type of metrics (either counter, gauge or timer). It would be great if I can get feedback from you if this is worth pursuing, or there is an existing solution, or my implementation plan is sound.