You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by 郑舒力 <ne...@gmail.com> on 2018/09/13 04:07:49 UTC
How to get taskmanager hostname and port on runtime
Hello community,
Is there a way to get taskmanager hostname and port on runtime?
I’d like to implement a kafka metric reporter, reporter should be able to report the taskmanager hostname and port to monitoring system.
Thanks.
Re: How to get taskmanager hostname and port on runtime
Posted by 郑舒力 <ne...@gmail.com>.
Hi,
Thanks for your reply. port means akka tcp port. Because I want to unique identify a taskmanager. container_id is an other choice.
Kafka metric reporter implement kafka interface, that is not a flink MetricReporter. So i can’t get flink runtime info directly.
> 在 2018年9月13日,下午4:25,Dawid Wysakowicz <dw...@apache.org> 写道:
>
> Hi,
>
> For the hostname, by default identifier for metrics scoped to taskmanager contain its hostname. You can read more about metrics scope here[1].
> What do you mean by port? Which port would you like to report?
>
> [1] https://ci.apache.org/projects/flink/flink-docs-release-1.6/monitoring/metrics.html#system-scope <https://ci.apache.org/projects/flink/flink-docs-release-1.6/monitoring/metrics.html#system-scope>
>
> On 13/09/18 06:07, 郑舒力 wrote:
>> Hello community,
>>
>> Is there a way to get taskmanager hostname and port on runtime?
>> I’d like to implement a kafka metric reporter, reporter should be able to report the taskmanager hostname and port to monitoring system.
>>
>> Thanks.
>
Re: How to get taskmanager hostname and port on runtime
Posted by Dawid Wysakowicz <dw...@apache.org>.
Hi,
For the hostname, by default identifier for metrics scoped to
taskmanager contain its hostname. You can read more about metrics scope
here[1].
What do you mean by port? Which port would you like to report?
[1]
https://ci.apache.org/projects/flink/flink-docs-release-1.6/monitoring/metrics.html#system-scope
On 13/09/18 06:07, 郑舒力 wrote:
> Hello community,
>
> Is there a way to get taskmanager hostname and port on runtime?
> I’d like to implement a kafka metric reporter, reporter should be
> able to report the taskmanager hostname and port to monitoring system.
>
> Thanks.