Return-Path: X-Original-To: apmail-ambari-dev-archive@www.apache.org Delivered-To: apmail-ambari-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A88EF18F99 for ; Mon, 8 Feb 2016 23:33:51 +0000 (UTC) Received: (qmail 17662 invoked by uid 500); 8 Feb 2016 23:33:51 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 17630 invoked by uid 500); 8 Feb 2016 23:33:51 -0000 Mailing-List: contact dev-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list dev@ambari.apache.org Received: (qmail 17614 invoked by uid 99); 8 Feb 2016 23:33:51 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Feb 2016 23:33:51 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 90B9729AE98; Mon, 8 Feb 2016 23:33:50 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============1598731461402557483==" MIME-Version: 1.0 Subject: Re: Review Request 43337: AMBARI-14962 Auto configure AMS UI to use AMS Datasource From: Aravindan Vijayan To: Sid Wagle , Sumit Mohanty , Dmytro Sen , Yusaku Sako Cc: Aravindan Vijayan , Ambari Date: Mon, 08 Feb 2016 23:33:50 -0000 Message-ID: <20160208233350.24150.84907@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Aravindan Vijayan X-ReviewGroup: Ambari X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/43337/ X-Sender: Aravindan Vijayan References: <20160208213019.24149.38370@reviews.apache.org> In-Reply-To: <20160208213019.24149.38370@reviews.apache.org> X-ReviewBoard-Diff-For: ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/templates/metrics_grafana_datasource.json.j2 X-ReviewBoard-Diff-For: ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana_util.py Reply-To: Aravindan Vijayan X-ReviewRequest-Repository: ambari --===============1598731461402557483== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/43337/ ----------------------------------------------------------- (Updated Feb. 8, 2016, 11:33 p.m.) 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 (updated) ----- 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 (updated) ------- Manual testing done. Added Unit tests Thanks, Aravindan Vijayan --===============1598731461402557483==--