[ 
https://issues.apache.org/jira/browse/FLINK-14144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17212435#comment-17212435
 ] 

Matthias commented on FLINK-14144:
----------------------------------

I was looking into 
[FLIP-104|https://cwiki.apache.org/confluence/display/FLINK/FLIP-104%3A+Add+More+Metrics+to+Jobmanager]
 after kind of finalizing 
[FLIP-102|https://cwiki.apache.org/confluence/display/FLINK/FLIP-102%3A+Add+More+Metrics+to+TaskManager]
 from the backend perspective. But I realized that there does not seem to be 
any work necessary on the backend site. The metrics REST API actually returns 
the values of the metrics. You have to pass a GET parameter called {{get}} 
having a comma-separated list of metrics you'd like to access: 

{code}http://localhost:8081/jobmanager/metrics?get=taskSlotsTotal,Status.JVM.GarbageCollector.global.Time,Status.JVM.GarbageCollector.global.Count{code}

The query above will return something like:
{code:java}
[
  {
    "id": "Status.JVM.GarbageCollector.global.Count",
    "value": "0"
  },{
    "id": "Status.JVM.GarbageCollector.global.Time",
    "value": "0"
  },{
    "id": "taskSlotsTotal",
    "value": "2"
  }
]
{code}
That's also the way you have to access the metrics in FLINK-15328.

 

> Add Metric for job manager
> --------------------------
>
>                 Key: FLINK-14144
>                 URL: https://issues.apache.org/jira/browse/FLINK-14144
>             Project: Flink
>          Issue Type: Improvement
>          Components: Runtime / Web Frontend
>            Reporter: Yadong Xie
>            Priority: Major
>
> There is a metric tab in each taskmanager page, but there is no metric data 
> in the job manager, it would be better for users to monitor the cluster with 
> job manager metrics.
> The 
> [API|https://ci.apache.org/projects/flink/flink-docs-stable/monitoring/rest_api.html#jobmanager-metrics]
>  provided now could only get the metric key without a value.
> REST API needed:
> add metrics value in /jobmanager/metrics API



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to