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 <[email protected]>
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 <[email protected]>
> *Sent:* Thursday, August 13, 2015 8:45 AM
> *To:* [email protected]
> *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
>