ambari-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Bende <bbe...@gmail.com>
Subject Re: Dynamic Metric Names
Date Mon, 17 Aug 2015 20:25:02 GMT
Sorry got cut short there...

Thanks Sid, I see what you are talking about with the YARN queue metrics.

It still seems to me like you need to know the dynamic values ahead of
time. For example, take this metric:

"metrics/yarn/Queue/$1.replaceAll(\"([.])\",\"/\")/AllocatedMB": {
  "metric": "yarn.QueueMetrics.Queue=(.+).AllocatedMB",
 "pointInTime": false,
"temporal": true
}

Then in YARN_widgets.json:
"name": "yarn.QueueMetrics.Queue=root.AllocatedMB",
"metric_path": "metrics/yarn/Queue/root/AllocatedMB",

So it had to be known to substitute in "root" in the widgets file ahead of
time, but what if you didn't know it was called root yet.

If you went into the UI to create a new widget is there a way to fill in a
dynamic name?

Thanks,

Bryan

On Mon, Aug 17, 2015 at 4:22 PM, Bryan Bende <bbende@gmail.com> wrote:

> Thanks Sid, I see what you are talking about with the YARN queue metrics.
>
> It still seems to me like you need to know the dynamic values ahead of
> time. For example, take this metric:
>
> "metrics/yarn/Queue/$1.replaceAll(\"([.])\",\"/\")/AllocatedMB": {
>   "metric": "yarn.QueueMetrics.Queue=(.+).AllocatedMB",
>  "pointInTime": false,
> "temporal": true
> }
>
> Then in YARN_widgets.json:
>
>
> On Fri, Aug 14, 2015 at 6:11 PM, Siddharth Wagle <swagle@hortonworks.com>
> wrote:
>
>> Hi Bryan,
>>
>>
>> Yes, we do have regex support in the declarative definition of the
>> service. Unfortunately, it isn't documented at the moment.
>>
>>
>> Best Example: YARN Queue metrics. The queue name is substiuted by the UI,
>> replaced by the MetricsPropertyProvider inside the actual metrics name
>> before calling the AMS service.
>>
>>
>> Similar examples exist in Flume as well where the flume agent name is a
>> runtime param.
>>
>>
>> -Sid
>>
>>
>> ------------------------------
>> *From:* Bryan Bende <bbende@gmail.com>
>> *Sent:* Thursday, August 13, 2015 8:45 AM
>> *To:* user@ambari.apache.org
>> *Subject:* Dynamic Metric Names
>>
>> Hello,
>>
>> Is it possible to define metrics and have the name include some kind of
>> parameter that would be determined later?
>>
>> For example "my.metric.{id}" where id would be based on a value from the
>> sending system that is not known until runtime.
>>
>> There appears to be an example of this in the Kafka metrics.json:
>>
>> "metrics/kafka/cluster/Partition/$1-UnderReplicated": {
>>               "metric": "kafka.cluster.Partition.(\\w+)-UnderReplicated",
>>               "pointInTime": true,
>>               "temporal": true
>> }
>>
>> but how do you use this when adding a widget?
>>
>> Thanks,
>>
>> Bryan
>>
>
>

Mime
View raw message