Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 8DDB0200B16 for ; Mon, 20 Jun 2016 16:52:36 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 8C2FE160A55; Mon, 20 Jun 2016 14:52:36 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7D5AD160A26 for ; Mon, 20 Jun 2016 16:52:35 +0200 (CEST) Received: (qmail 22531 invoked by uid 500); 20 Jun 2016 14:52:34 -0000 Mailing-List: contact dev-help@brooklyn.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@brooklyn.apache.org Delivered-To: mailing list dev@brooklyn.apache.org Received: (qmail 22519 invoked by uid 99); 20 Jun 2016 14:52:29 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Jun 2016 14:52:29 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id EA1EE1A03B2 for ; Mon, 20 Jun 2016 14:52:28 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.18 X-Spam-Level: * X-Spam-Status: No, score=1.18 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_DBL_ABUSE_REDIR=0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=cloudsoftcorp.com Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id qV01gY9h2GF9 for ; Mon, 20 Jun 2016 14:52:25 +0000 (UTC) Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id 69A195F239 for ; Mon, 20 Jun 2016 14:52:24 +0000 (UTC) Received: by mail-wm0-f46.google.com with SMTP id f126so72807214wma.1 for ; Mon, 20 Jun 2016 07:52:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudsoftcorp.com; s=google; h=mime-version:subject:from:in-reply-to:date:cc:message-id:references :to; bh=QwQ9RwY0i8wfQNuWHagXkokoY4kvoqsb5T0I83n2YtU=; b=J+QRlRZNmpgejibUZF2iT35YZusNDUtlBzk3Hq0TS7pU2W8nqqzoRaaXt+SYb0CDtY q9xXA35I2QV8k32C1E3C9qs0I8pIpoAF7UNV0jeuIPtGEefafouzzHexYght/ulpVT1Y 8F6FRcKmHtf97MpcyZKm/E3gzk+J9AWBBXSP4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=QwQ9RwY0i8wfQNuWHagXkokoY4kvoqsb5T0I83n2YtU=; b=Amx1N+gHbje1NV7aiqDiA8gHJZI0DTbY2Ag7Ezu9u3JhclpW/Zj4pKC1qZbbZU0l/F FAaUThduEh8NFMxnZviswPNQUW5bnREy3gTi2Mych1F7gnQlRK9dZN8zPb0p/Vy2BP/3 K+2GFQujc4r0VgFr93FO7BqZAsMeYA8a3MCIcR3K1gwB6mQpibDu2J955M2v+zrP7uyz QJ7Y5XtPTGIqcrQ+2w0UJCbQZFq3bqIZMcqbDWfFZHFP74bo6CfxFxKVeZ5TXVpBdjvU NkGVhlv0BdnGPxbnlJaxPZst4t93Y/E3msjTRMJrOuqZhpxYVtTUafaHQTXn8GgfYpre j65w== X-Gm-Message-State: ALyK8tILXwEWzguAj/impmaeWVG57nALvm1zgg+2lZlJQV5QF0fl4z3azDIGrSbQGsMBnA3HJc65kjcHq7xdcy4KWPEXzZQxed2FaV6CvATANVHPZcGqxOHVkiBGimq6oOnb4A== X-Received: by 10.28.9.139 with SMTP id 133mr12430714wmj.93.1466434337434; Mon, 20 Jun 2016 07:52:17 -0700 (PDT) Received: from [10.10.205.71] ([212.250.191.72]) by smtp.gmail.com with ESMTPSA id qm9sm18203842wjc.36.2016.06.20.07.52.16 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 20 Jun 2016 07:52:16 -0700 (PDT) Content-Type: multipart/alternative; boundary="Apple-Mail=_ADC17FD0-E3F0-44CC-AB34-37669B073702" Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: Machine Metrics From: Geoff Macartney In-Reply-To: Date: Mon, 20 Jun 2016 15:52:15 +0100 Cc: dev@brooklyn.apache.org Message-Id: <2FE14402-BCBD-49FB-96DF-6D7FA2DAFC3A@cloudsoftcorp.com> References: <60FFCB3C-C325-4330-AB6C-295A682A0F1F@cloudsoftcorp.com> To: Andrew Kennedy X-Mailer: Apple Mail (2.3124) X-Legal-Virus-Advice: Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by Cloudsoft Corporation Limited in this regard and the recipient should carry out such virus and other checks as it considers appropriate. X-Legal-Confidentiality: This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. Cloudsoft Corporation Limited does not accept responsibility for changes made to this message after it was sent. X-Legal-Company-Info: Cloudsoft Corporation Limited. Registered in Scotland. Number: SC349230. Registered Office: 13 Dryden Place, Edinburgh, EH9 1RP. archived-at: Mon, 20 Jun 2016 14:52:36 -0000 --Apple-Mail=_ADC17FD0-E3F0-44CC-AB34-37669B073702 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Grand thanks Andrew. G =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2= =80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80= =94=E2=80=94=E2=80=94=E2=80=94 Gnu PGP key - http://is.gd/TTTTuI > On 20 Jun 2016, at 15:25, Andrew Kennedy = wrote: >=20 > Geoff, I have added a `StopFeedsAtMachineTask` to the lifecycle stop = tasks, which will take care of this. Have a look at the updated PR. = However, as Svet pointed out, the Feed management code in Brooklyn is = definitely in need of some attention and refactoring... >=20 > Andrew. >=20 > On Mon, 20 Jun 2016 at 01:41 Geoff Macartney = > wrote: > I think that looks like a good approach, +1 from me. >=20 > Will have a think at the feed stop problem. >=20 > Cheers > Geoff >=20 >=20 > =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94= =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2= =80=94=E2=80=94=E2=80=94=E2=80=94 > Gnu PGP key - http://is.gd/TTTTuI >=20 >=20 >> On 19 Jun 2016, at 15:54, Andrew Kennedy = > wrote: >>=20 >> Hi. >>=20 >> Are people happy with the initializer approach? I think the only = outstanding issue is something @neykov pointed out, which is that when = using `Entity#addFeed()` the feeds are not stopped when the entity is = stopped. I will have another look at fixing that, but suggestions = welcome. >>=20 >> Andrew. >>=20 >> On Thu, 16 Jun 2016 at 04:49 Andrew Kennedy = > wrote: >> Thanks for the feedback. >>=20 >> I decided on an `EntityInitializer` instead, because it also adds = enrichers of its own. The pull request has been updated with this change = now. To use it, add YAML like the following: >>=20 >> ``` >> services: >> - type: = org.apache.brooklyn.entity.software.base.EmptySoftwareProcess >> brooklyn.initializers: >> - type: org.apache.brooklyn.entity.machine.AddMachineMetrics >> ``` >>=20 >> Cheers, =20 >> Andrew. >>=20 >> On Thu, 16 Jun 2016 at 11:53 Geoff Macartney = > wrote: >> I agree with Sam and Svet, + 1 to making it an enricher, if possible, = or at least somehow keeping it separate from SoftwareProcess. >>=20 >>=20 >> =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94= =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2= =80=94=E2=80=94=E2=80=94=E2=80=94 >> Gnu PGP key - http://is.gd/TTTTuI >>=20 >>=20 >>> On 16 Jun 2016, at 10:41, Sam Corbett > wrote: >>>=20 >>> I share your concern that the placement of the feed is wrong. I feel = like we would be bending Brooklyn's abstractions to fit the case rather = than working out a better abstraction. Of course, deciding what data = reflects a software process is subjective and as you point out we = already break the encapsulation in a variety of places. Was the plan not = always to make locations into entities too? This would be trivial if = that were the case. >>>=20 >>> I also think we're continually making SoftwareProcess too important. = Svet's suggestion of an enricher is a good one - I want to explicitly = mix the capability in to entities, not enable it with a flag. >>>=20 >>> Sam >>>=20 >>>=20 >>> On 16/06/2016 09:13, Andrew Kennedy wrote: >>>> Hi. >>>>=20 >>>> For the project I am working on, we would like to use the CPU = utilization >>>> as one of the metrics for scaling a cluster. The existing = `MachineEntity` >>>> has a sensor feed that produces this data, along with uptime and = memory >>>> usage information. The feed works on Linux VMs only, currently, as = is uses >>>> SSH commands on the host to generate the values i.e. the `uptime` = command, >>>> or the contents of files in `/proc/`. >>>>=20 >>>> I would like to propose moving the feed to `SoftwareProcess` so = that it is >>>> available to all entities. It would be disabled normally, set by a >>>> `ConfigKey` flag. This would be named = "metrics.machine.retrieve" >>>> to correspond to "metrics.usage.retrieve" which enables sensors in = feeds >>>> that return application or process specific information. The >>>> `MachineEntity` would obviously have the default value set to = "true", to >>>> maintain current behaviour. >>>>=20 >>>> The only issue with this change is that the placement of the sensor = feed >>>> feels slightly wrong. These are returning data about the _machine_ = but the >>>> entity represents a _process_ on that machine, and there may in = fact be >>>> multiple entities sharing a single machine, via `SameServerEntity`. = The >>>> `MachineEntity` is used to represent a VM without any applications = running >>>> on it, and would not normally be part of a blueprint, so these = sensors are >>>> not normally accessible. There is some precedent for placing = machine data >>>> on an entity, such as the `HOSTNAME` sensor, so I think the break = in >>>> encapsulation is quite small. >>>>=20 >>>> The PR containing the change is here: >>>>=20 >>>> - https://github.com/apache/brooklyn-server/pull/204 = >>>>=20 >>>> I'd appreciate any comments on whether this is a useful change, as = well as >>>> a review of the pull request... >>>>=20 >>>> Thanks, >>>> Andrew. >>>=20 >>=20 >> --=20 >> Andrew Kennedy ; Founder clocker.io project ; = @grkvlt ; Cloudsoft >>=20 >> --=20 >> Andrew Kennedy ; Founder clocker.io project ; = @grkvlt ; Cloudsoft >>=20 >=20 > --=20 > Andrew Kennedy ; Founder clocker.io project ; = @grkvlt ; Cloudsoft >=20 --Apple-Mail=_ADC17FD0-E3F0-44CC-AB34-37669B073702--