Hi Bryan,

Service related widgets pre-defined in widgets.json file of a service are 
created by ambari server on creation of a service resource.

API to access all widgets in a cluster is
http://localhost:8080/api/v1/clusters/c1/widgets<http://104.196.80.201:8080/api/v1/clusters/c1/widgets>

API to access all widgets comprised from metrics of a specific service is:
<http://104.196.80.201:8080/api/v1/clusters/c1/widgets?WidgetInfo/metrics.matches(.*%5C%22service_name%5C%22:%5C%22HDFS%5C%22.*)>http://localhost:8080/api/v1/clusters/c1/widgets?WidgetInfo/metrics.matches<http://localhost:8080/api/v1/clusters/c1/widgets?WidgetInfo/metrics.matches(.*\"service_name\":\"HDFS\".*)>(.*\"service_name\":\"HDFS\".*)<http://localhost:8080/api/v1/clusters/c1/widgets?WidgetInfo/metrics.matches(.*\"service_name\":\"HDFS\".*)>

Once service is created making subsequent changes in widgets.json will not work 
and so the file is not supposed to be then changed. Instead use the widget API 
to edit or delete the existing widget. Also a new service widget can be created 
in a cluster anytime.

All these operations (Create, Edit and Delete) on a widget are supported and 
exposed on ambari-web ui  which can be leveraged to do the needful.

NOTE: Hovering on a widget on ambari-web ui will show the icon for editing that 
widget definition.

— Thanks
     Jaimin

From: Bryan Bende
Reply-To: "[email protected]<mailto:[email protected]>"
Date: Thursday, July 30, 2015 at 6:24 AM
To: "[email protected]<mailto:[email protected]>"
Subject: Updating Metric Widgets

Hello,

At what point does Ambari read the widgets.json and refresh the widgets? and 
are they cached anywhere?

I've made a change and restarted my service, restarted ambari-server, have even 
gone as far as restarting the HDP VM, but I don't see the change unless I 
completely remove my service and reinstall it.

Is that expected?

Thanks,

Bryan

Reply via email to