Support Questions

Find answers, ask questions, and share your expertise

How can I use "jvm.JvmMetrics.GcCount" metric of RegionServer or an equivalent metric of it on Ambari's widget?


I tried to use "jvm.JvmMetrics.GcCount" of RegionServer on Ambari WebUI's widget, but it did not work. The widget showed "No Data" message.

And then I searched such a metric in AMS HBase and I found "jvm.RegionServer.JvmMetrics.GcCount" in AMS HBase "metric_record" table. "jvm.JvmMetrics.GcCount" for app_id "hbase" was not found.

So I struggled to use "jvm.RegionServer.JvmMetrics.GcCount' instead, but this trial has not achieved yet.

I changed "jvm.JvmMetrics.GcCount" to "jvm.RegionServer.JvmMetrics.GcCount" in "HBASE_REGIONSERVER" section in metrics.json in "/var/lib/ambari-server/resources/common-services/HBASE/" and "/var/lib/ambari-server/resources/stacks/HDP/2.3/services/HDFS" on Ambari Server's host, and I restarted Ambari Server, but it did not take effect.

I know that I can see this metric in Grafana, but in my case this time I have to use this metric on Ambari WebUI's widget...


Super Mentor


How are you creating the widget?

I tried creating a simple "GcCount" widget as following and it worked:

  "href": "",
  "WidgetInfo": {
    "author": "admin",
    "cluster_name": "plain_ambari",
    "description": "Test_Region_GcCount",
    "id": 301,
    "metrics": "[{\"service_name\":\"HBASE\",\"component_name\":\"HBASE_REGIONSERVER\",\"name\":\"jvm.JvmMetrics.GcCount._avg\",\"metric_path\":\"metrics/jvm/gcCount._avg\"}]",
    "properties": "{\"graph_type\":\"LINE\",\"display_unit\":\"\"}",
    "scope": "USER",
    "time_created": 1519189605709,
    "values": "[{\"name\":\"Data Series 1\",\"value\":\"${jvm.JvmMetrics.GcCount._avg}\"}]",
    "widget_name": "Test_Region_GcCount",
    "widget_type": "GRAPH"








I've re-tried with original metrics.json just before, and it works...

It might be my error. Thank you for noticing!

By the way, I found that this metric("jvm.JvmMetrics.GcCount") can't be used on HDInsight 3.6.

Is there any work-around for it?

Super Mentor


I do not have information about "HDInsight 3.6" metrics.


I see. Thank you for replying!

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.