From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15015 invoked by alias); 15 Nov 2019 17:58:06 -0000 Mailing-List: contact elfutils-devel-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: elfutils-devel-owner@sourceware.org Received: (qmail 14999 invoked by uid 89); 15 Nov 2019 17:58:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.100.3 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.1 spammy=Best X-Spam-Status: No, score=-3.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on sourceware.org X-Spam-Level: X-HELO: us-smtp-1.mimecast.com Received: from us-smtp-delivery-1.mimecast.com (HELO us-smtp-1.mimecast.com) (207.211.31.120) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 15 Nov 2019 17:58:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573840683; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cw1jQ978nPpNlyZ3tWu5SqiChRj7KGxvCpusc2ka9OA=; b=fFx1hV+0Mm3hCNV0RarxpZ9vGwP4hWFqTEZX35XrP1DserAJEcyyzu9fqTfyWXTupCVCFP 163LRUTmxCckGoThb7ZrJjEkZ1UMZv3G8nIXpr4N1nQYOrsU8oiMEFGcbpBP3ttuv+/QCB /el5G91s37I47rcA/Kp2VhB7A/i2c/s= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-193-Bu14BX-CN72ThcSxWTWKDQ-1; Fri, 15 Nov 2019 12:58:00 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 90FF418B5FA0; Fri, 15 Nov 2019 17:57:59 +0000 (UTC) Received: from redhat.com (ovpn-116-19.phx2.redhat.com [10.3.116.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6F41967E61; Fri, 15 Nov 2019 17:57:59 +0000 (UTC) Received: from fche by redhat.com with local (Exim 4.92) (envelope-from ) id 1iVfr3-0004p5-Qc; Fri, 15 Nov 2019 12:57:57 -0500 Date: Fri, 15 Nov 2019 17:58:00 -0000 From: "Frank Ch. Eigler" To: Mark Wielaard Cc: elfutils-devel@sourceware.org, amerey@redhat.com Subject: Re: patch 5 debuginfod: prometheus metrics Message-ID: <20191115175757.GA15272@redhat.com> References: <20191028190438.GC14349@redhat.com> <20191028190602.GD14349@redhat.com> <20191028190726.GE14349@redhat.com> <20191104214823.GA17633@redhat.com> <20191107090732.GA19337@redhat.com> <20191107090833.GB19337@redhat.com> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.12.0 (2019-05-25) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-MC-Unique: Bu14BX-CN72ThcSxWTWKDQ-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-IsSubscribed: yes X-SW-Source: 2019-q4/txt/msg00146.txt.bz2 Hi - > Could you also add a reference to the Prometheus Exposition format. I > see it is already in a comment in the code. Best to also add it as See > also in the docs. OK. > > +control. The \fI/metrics\fP webapi endpoint is probably not > > +appropriate for disclosure to the public. >=20 > So, should there be an option to turn it off? IMHO not necessary. The security section already advises against exposing an unprotected debuginfod server to the public. A front-end reverse-proxy would easily filter requests to /metrics. > > +#ifdef __linux__ > > +#define gettid() syscall(SYS_gettid) > > +#else > > +#define gettid() pthread_self() > > +#endif >=20 > You might want to rename this since newer glibc might expose gettid(). OK. > > +# Fetch some metrics, if curl program is installed > > +if which curl 2>/dev/null; then > > + curl http://localhost:$PORT1/badapi > > + curl http://localhost:$PORT1/metrics > > ######################################################################= ## >=20 > I think it is better to check with: > if type curl >/dev/null 2>&1; then OK. - FChE