Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3C7D3200D0E for ; Tue, 26 Sep 2017 15:57:10 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 3AEA71609C1; Tue, 26 Sep 2017 13:57:10 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 805FF1609B4 for ; Tue, 26 Sep 2017 15:57:09 +0200 (CEST) Received: (qmail 86376 invoked by uid 500); 26 Sep 2017 13:57:08 -0000 Mailing-List: contact dev-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list dev@flink.apache.org Received: (qmail 86365 invoked by uid 99); 26 Sep 2017 13:57:08 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Sep 2017 13:57:08 +0000 Received: from [192.168.2.104] (p57A8B382.dip0.t-ipconnect.de [87.168.179.130]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id D80071A012F for ; Tue, 26 Sep 2017 13:57:07 +0000 (UTC) Subject: Re: Question about Flink Metrics To: dev@flink.apache.org References: <8E213873-50D2-4157-B5DE-13E462307BE6@gmail.com> From: Chesnay Schepler Message-ID: <255a975f-93ae-0079-9afa-26e40c76b65a@apache.org> Date: Tue, 26 Sep 2017 15:57:04 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US archived-at: Tue, 26 Sep 2017 13:57:10 -0000 Hello, i see the value in supporting this, and it's also quite easy to do so actually. I've filed FLINK-7692, containing instructions on how to implement this. @Tony Are you interested in implementing this? On 26.09.2017 14:10, Tony Wei wrote: > Hi Hai Zhou, > > It's a good idea to implement my own reporter, but I think it is not the > best solution. > After all, reporter needs to be set well when starting the cluster. It is > not efficient to update cluster whenever you have a new metric for a new > streaming job. > > Anyway, it is still a workaround for now. Thank you! > > Best Regards, > Tony Wei > > > 2017-09-26 19:13 GMT+08:00 Hai Zhou : > >> Hi Tony, >> >> you can consider implementing a reporter, use a trick to convert the >> flink's metrics to the structure that suits your needs. >> >> This is just my personal practice, hoping to help you. >> >> Cheers, >> Hai Zhou >> >> >> 在 2017年9月26日,17:49,Tony Wei 写道: >> >> Hi, >> >> Recently, I am using PrometheusReporter to monitor every metrics from >> Flink. >> >> I found that the metric name in Prometheus will map to the identifier from >> User Scope and System Scope [1], and the labels will map to Variables [2]. >> >> To monitor the same metrics from Prometheus, I would like to use labels >> to differentiate them. >> Under the job/task/operator scope, it words fine to me. However, its not >> convenient to me to monitor partitions' states from Kakfa consumer, because >> I couldn't place partition id like a tag on each metric. All partition >> states like current commit offset will be a unique metric in Prometheus. >> It's hard to use visualization tool such as Grafana to monitor them. >> >> My question is: Is it possible to add tags on Metric, instead of using >> `.addGroup()`? >> If not, will it be a new feature on Flink Metrics in the future? Since I >> am not sure about how other reporters work, I am afraid that it is not a >> good design to just fulfill the requirement on particular reporter. >> >> Please guide and thanks for your help. >> >> Best Regards, >> Tony Wei >> >> [1]: https://ci.apache.org/projects/flink/flink-docs- >> release-1.3/monitoring/metrics.html#scope >> [2]: https://ci.apache.org/projects/flink/flink-docs- >> release-1.3/monitoring/metrics.html#list-of-all-variables >> >> >>