Date: Sun, 11 Dec 2016 16:42:38 -0330 From: "Jonathan Anderson" <jonathan@FreeBSD.org> To: "Allan Jude" <allanjude@freebsd.org> Cc: freebsd-hackers@freebsd.org Subject: Re: Sysctl as a Service, or: making sysctl(3) more friendly for monitoring systems Message-ID: <200A5D70-24CE-4843-B99D-E10A2AF4F68F@FreeBSD.org> In-Reply-To: <eea0aa41-2bbc-0ddc-d951-f495c5ba2341@freebsd.org> References: <CABh_MKk87hJTsu1ETX8Ffq9E8gqRPELeSEKzf1jKk_wwUROgAw@mail.gmail.com> <eea0aa41-2bbc-0ddc-d951-f495c5ba2341@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 11 Dec 2016, at 16:25, Allan Jude wrote: > On 2016-12-11 14:35, Ed Schouten wrote: >> >> The other day I was thinking: in a certain way, the node exporter is >> a >> bit of a redundant tool on the BSDs. Instead of needing to write >> custom collectors for every kernel subsystem, we could write a >> generic >> exporter for converting the entire sysctl(3) tree to Prometheus >> metrics [...] >> >> A final remark I want to make: a concern might be that changes like >> these would not be generic, but only apply to Prometheus. I tend to >> disagree. First of all, an advantage of Prometheus is that the >> coupling is very loose: it's just a GET request with key-value pairs. >> Anyone is free to add his/her own implementation. > > I would find this very useful. I've wanted to have something like > this, > and expose more data (especially re: disks) via sysctl for a long > time. > > The nonsense we do to deal with monitoring dev.cpu.[0-n].temperature > and > deal with it are rather annoying. > > I like the sound of everything you propose. Especially flagging > sysctls > so it is possible to programmatically get 'type' information. I, for one, agree, and at the risk of being slightly provocative, I think it could be taken even further. :) I'd love to be able to retrieve a sysctl entry or subtree as an nvlist_t. Rather than doing lots of system calls to enumerate clearly-related sysctl values, it would be very cool to do one system call and then inspect the resulting data structure in memory. We already use libnv in a number of places, and it seems like it could be a natural mapping from the sysctl hierarchy. Jon -- Jonathan Anderson jonathan@FreeBSD.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200A5D70-24CE-4843-B99D-E10A2AF4F68F>