From owner-freebsd-hackers@freebsd.org Tue Dec 13 18:12:33 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1593C76924 for ; Tue, 13 Dec 2016 18:12:33 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-yb0-x230.google.com (mail-yb0-x230.google.com [IPv6:2607:f8b0:4002:c09::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A2E261635 for ; Tue, 13 Dec 2016 18:12:33 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-yb0-x230.google.com with SMTP id d59so21302771ybi.1 for ; Tue, 13 Dec 2016 10:12:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=+bqc79gn+qeu+Ai4sdd99k/0sBmRnZ5+8v2Tufi64VA=; b=B8QFkKtAcw/Dm1Z/qx0HGWlYImuk7+XaFxyzk7N6wmdtGfvPDPolp3OhN+KQdfv+AM e7eDeRjhvshKhjF5L4lbRvYFhgZcOyQ9WZDAooIRlHNcsbS+Xa8ZAjwjpjNZQLcpvZgy TbblPOXvHl1eIncnFh8NVq4zgN5c2zbprKOWlSwYQ46f56JHPikaqogoT6pIid6UsLKX +ElWJ8sD34iEF/LRl1wYgpYAlwAhCg3XZ5W3baRqumvaAZ65KmYuDuTIkXAZhA8vzrIh cN4oMW0BVRth+Hjh3Srw+/MHRJY+EX0ylrv94J9NxnifBqLcA5YIPrIZMCz28zeWFGZe SRjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=+bqc79gn+qeu+Ai4sdd99k/0sBmRnZ5+8v2Tufi64VA=; b=FRQGgLda1XFq16ouEEYkVhUkBAPDxNgOzxgC13np6ngpXcZ+Or4Lw8nB3s/cg2OzKj QosoTWxSqAwi8M5KrLGs1eiE2xbxPTDB351FNt7i7RYIE1iEru3aWir2AKOFkCJNnpXk t1kLvG/AbSfvaEGewboVgUxbfjv1JoFKmfT25EhUSrYROzgfAOo3rvoh5We9v/Axqyyy OOhhMrwBh7S8a1pLKNDg604FWLWSHFAF0WG+J4RWboTG7eNTdYckjPQbd/Wh1s4foUa1 w1vxd+Fkp7Si1W54noi6+tAgVAXgcmSnGsfFMFQHNF2PoizbRXhzwxByLAFQT24q4ols QCPg== X-Gm-Message-State: AKaTC01nim0KcrNOEDOH2p7VU/RHyAAceR+65lCsKgyMyFk/dO/Dcbr2uPFrt4nvU7blpQyt98pUxNgqTXoKEw== X-Received: by 10.37.210.197 with SMTP id j188mr50362887ybg.168.1481652752828; Tue, 13 Dec 2016 10:12:32 -0800 (PST) MIME-Version: 1.0 Received: by 10.129.0.212 with HTTP; Tue, 13 Dec 2016 10:12:02 -0800 (PST) In-Reply-To: References: <200A5D70-24CE-4843-B99D-E10A2AF4F68F@FreeBSD.org> From: Ed Schouten Date: Tue, 13 Dec 2016 19:12:02 +0100 Message-ID: Subject: Re: Sysctl as a Service, or: making sysctl(3) more friendly for monitoring systems To: Mark Rushakoff Cc: Jonathan Anderson , FreeBSD Hackers , Allan Jude Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Dec 2016 18:12:34 -0000 2016-12-13 17:16 GMT+01:00 Mark Rushakoff : > My impression, from a monitoring perspective, is that there isn't much > demand to gather _everything_ in sysctl in a single call, although categorized > subsets might be appealing. Exactly. Right now my exporter simply dumps everything, but my intention it so that you can also pass in a list of prefixes on the command line, like this: $ prometheus_sysctl_exporter hw.acpi.thermal kern.openfiles kern.maxfiles This will make it export only ACPI thermal metrics and selected values from kern. Still, the advantage of having something like this is that it significantly lowers the barrier for accessing such metrics. Right now we first need to add it to FreeBSD and then hope that someone out there takes the effort to write a plugin. Exporting all metrics is also not that bad if that's really what you're interested in. On my simple system the exporter only returns about ~1500 metrics, as it can only extract sysctls with integer values. From personal experience I know that Prometheus can handle that easily, especially when it happens on the same physical network, where bandwidth is not an issue. Discarding uninteresting data can also be performed when federating. -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717