Created on 03-15-2018 08:31 PM - edited 09-16-2022 05:58 AM
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:
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
Created 03-15-2018 09:25 PM
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...
.
Created 03-15-2018 09:25 PM
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...
.
Created 03-16-2018 08:12 AM
@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
Created 03-16-2018 08:35 AM
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