ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From avija...@apache.org
Subject [2/2] ambari git commit: AMBARI-14962 Auto configure AMS UI to use AMS Datasource - Commit 3 (avijayan)
Date Wed, 10 Feb 2016 20:38:00 GMT
AMBARI-14962 Auto configure AMS UI to use AMS Datasource - Commit 3 (avijayan)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0d52ebc0
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0d52ebc0
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0d52ebc0

Branch: refs/heads/trunk
Commit: 0d52ebc05593ebce6e3ab37535bf1345df8f8492
Parents: 49e3351
Author: Aravindan Vijayan <avijayan@hortonworks.com>
Authored: Wed Feb 10 12:29:23 2016 -0800
Committer: Aravindan Vijayan <avijayan@hortonworks.com>
Committed: Wed Feb 10 12:29:23 2016 -0800

----------------------------------------------------------------------
 .../0.1.0/package/scripts/metrics_grafana_util.py              | 6 ++++--
 .../0.1.0/package/templates/metrics_grafana_datasource.json.j2 | 2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/0d52ebc0/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana_util.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana_util.py
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana_util.py
index c4a91e1..5ab40b0 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana_util.py
+++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana_util.py
@@ -58,8 +58,9 @@ def create_ams_datasource():
         Logger.info("Ambari Metrics Grafana datasource already present. Checking Metrics
Collector URL")
         datasource_url = datasources_json[i]["url"]
 
-        if datasource_url == (params.metric_collector_host + ":" + params.metric_collector_port
-                                 + "/ws/v1/timeline/metrics") :
+        if datasource_url == (params.ams_grafana_protocol + "://"
+                                + params.metric_collector_host + ":"
+                                + params.metric_collector_port):
           Logger.info("Metrics Collector URL validation succeeded. Skipping datasource creation")
           GRAFANA_CONNECT_TRIES = 0 # No need to create datasource again
 
@@ -84,6 +85,7 @@ def create_ams_datasource():
     try:
       ams_datasource_json = Template('metrics_grafana_datasource.json.j2',
                              ams_datasource_name=METRICS_GRAFANA_DATASOURCE_NAME,
+                             ams_grafana_protocol=params.ams_grafana_protocol,
                              ams_collector_host=params.metric_collector_host,
                              ams_collector_port=params.metric_collector_port).get_content()
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/0d52ebc0/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/templates/metrics_grafana_datasource.json.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/templates/metrics_grafana_datasource.json.j2
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/templates/metrics_grafana_datasource.json.j2
index 1b03a2d..a803da5 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/templates/metrics_grafana_datasource.json.j2
+++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/templates/metrics_grafana_datasource.json.j2
@@ -20,7 +20,7 @@
   "name": "{{ams_datasource_name}}",
   "type": "ambarimetrics",
   "access": "proxy",
-  "url": "{{ams_collector_host}}:{{ams_collector_port}}/ws/v1/timeline/metrics",
+  "url": "{{ams_grafana_protocol}}://{{ams_collector_host}}:{{ams_collector_port}}",
   "password": "",
   "user": "",
   "database": "",


Mime
View raw message