> On Фев. 9, 2016, 8:29 д.п., Dmytro Sen wrote: > > ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/templates/metrics_grafana_datasource.json.j2, > > line 5 > > <https://reviews.apache.org/r/43337/diff/2/?file=1237870#file1237870line5> > > > > I thought, Ambari datasource should hava an ambari server hostname and > > port as an url. Here's working datasource on my cluster > > > > > > {"id":1,"orgId":1,"name":"ams","type":"ambari","access":"proxy","url":"http://localhost:8080","password":"","user":"","database":"","basicAuth":true,"basicAuthUser":"","basicAuthPassword":"","withCredentials":false,"isDefault":false,"jsonData":null} > > > > Ambari plugin for Grafana uses ambari server API to discover component, > > host and metric names. > > Aravindan Vijayan wrote: > DS, that was the way the old plugin worked. After recent changes to the > grafana plugin, it works directly work with AMS.
Ok, thanks for explaining - Dmytro ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/43337/#review118370 ----------------------------------------------------------- On Фев. 8, 2016, 11:33 п.п., Aravindan Vijayan wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/43337/ > ----------------------------------------------------------- > > (Updated Фев. 8, 2016, 11:33 п.п.) > > > Review request for Ambari, Dmytro Sen, Sumit Mohanty, Sid Wagle, and Yusaku > Sako. > > > Bugs: AMBARI-14962 > https://issues.apache.org/jira/browse/AMBARI-14962 > > > Repository: ambari > > > Description > ------- > > TODO > Invoke Grafana's create datasource REST call to configure the datasource as > part of AMS UI lifecycle commands (say "Start"). > > IMPLEMENTATION LOGIC > > . During Grafana START > . Check if AMBARI_METRICS datasource already exists in Grafana. > . If datasource EXISTS > . Check Collector Host is valid. > . If not valid, delete obselete datasource entry from Grafana. > . If Collector host valid, skip_creating_datasource = True. > . If skip_creating_datasource != True > . Create datasource with name = AMBARI_METRICS and URL as the current > collector URL. > > > Diffs > ----- > > > ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana.py > f876036 > > ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana_util.py > PRE-CREATION > > ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/templates/metrics_grafana_datasource.json.j2 > PRE-CREATION > > ambari-server/src/test/python/stacks/2.0.6/AMBARI_METRICS/test_metrics_grafana.py > 5bc1412 > > Diff: https://reviews.apache.org/r/43337/diff/ > > > Testing > ------- > > Manual testing done. > > Added Unit tests > > > Thanks, > > Aravindan Vijayan > >
