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:22:57 GMT
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