How to get taskmanager hostname and port on runtime

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to get taskmanager hostname and port on runtime

Shu Li Zheng
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.
Reply | Threaded
Open this post in threaded view
|

Re: How to get taskmanager hostname and port on runtime

Dawid Wysakowicz-2

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.


signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: How to get taskmanager hostname and port on runtime

Shu Li Zheng
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 <[hidden email]> 写道:

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.