Support Questions

Find answers, ask questions, and share your expertise

Collect HBASE metrics

avatar

Hello, i am trying to collect some metrics related to hbase but i keep getting metrics related to ams-hbase. i sent the following request:

http://<server>:6188/ws/v1/timeline/metrics?metricNames=master.Server.numDeadRegionServers&appid=hba...

and got the following response related to ams hbase:

{ "metrics": [{ "timestamp": 1521145230000, "metadata": {}, "metricname": "master.Server.numDeadRegionServers", "appid": "ams-hbase", "starttime": 1521145230000, "metrics": { "1521145230000": 0.0 } } ] }

In the real sense, 2 region servers are down. how do i collect the intended metrics.

Thanks

1 ACCEPTED SOLUTION

avatar
Master Mentor

@Biliyaminu Umar

You are using incorrect "appid" in your rest call.

For HBase metrics it should be "appId=hbase" instead of "appId=ams-hbase" (this is for AMS HBase)

http://<server>:6188/ws/v1/timeline/metrics?metricNames=master.Server.numDeadRegionServers._max&host...

.

View solution in original post

3 REPLIES 3

avatar
Master Mentor

@Biliyaminu Umar

You are using incorrect "appid" in your rest call.

For HBase metrics it should be "appId=hbase" instead of "appId=ams-hbase" (this is for AMS HBase)

http://<server>:6188/ws/v1/timeline/metrics?metricNames=master.Server.numDeadRegionServers._max&host...

.

avatar

@Jay Kumar SenSharma

Thanks for your response. It resolves the issue. I realised that once i specify the appId, i can not collect multiple metrics with one call. Is there any workaround wheeeby i can specify appId for some metrics and not others in same call. These metrics are all using same appId (hbase). If i dont specify appId, the call returns the metrics for ams-hbase.

Thanks

avatar
Master Mentor

@Biliyaminu Umar

As per AMS specification the "appId" and "metricsNames" are the mandatory attributes.

In case of metrics names in some places we can use Wild Cards like following:

http://<server>:6188/ws/v1/timeline/metrics?metricNames=regionserver.Server.%&appId=hbase&startTime=...

.

In the above case it will show all the "regionServer.Server.%" metrics.

More details about wild card can be found here: https://cwiki.apache.org/confluence/display/AMBARI/Metrics+Collector+API+Specification