get custom gauge metric from WebMonitorEndpoint

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

get custom gauge metric from WebMonitorEndpoint

Georgi Stoyanov

I've got custom metric ->


And I'm using them as suggested in the documentation ->

getRuntimeContext().getMetricGroup().gauge("MyCustomMetric", new TestMetric());

I want to get this metric with GET method, but so far I tried almost everything in the API documentation (https://ci.apache.org/projects/flink/flink-docs-release-1.8/monitoring/rest_api.html ) but didn't find that metric. Do you know how (or even could I) get that custom metric via API?



Kind Regards,
Georgi


Reply | Threaded
Open this post in threaded view
|

Re: get custom gauge metric from WebMonitorEndpoint

Chesnay Schepler
You should be able to get the value of your custom metric. You'll have to set the log level to DEBUG and scan the logs for metric-related errors.

On 23/04/2019 22:25, Georgi Stoyanov wrote:

I've got custom metric ->


And I'm using them as suggested in the documentation ->

getRuntimeContext().getMetricGroup().gauge("MyCustomMetric", new TestMetric());

I want to get this metric with GET method, but so far I tried almost everything in the API documentation (https://ci.apache.org/projects/flink/flink-docs-release-1.8/monitoring/rest_api.html ) but didn't find that metric. Do you know how (or even could I) get that custom metric via API?



Kind Regards,
Georgi