Sysctl as a Service, or: making sysctl(3) more friendly for monitoring systems

Ed Schouten ed at nuxi.nl
Tue Dec 13 18:12:34 UTC 2016


2016-12-13 17:16 GMT+01:00 Mark Rushakoff <mark at influxdb.com>:
> 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 <ed at nuxi.nl>
Nuxi, 's-Hertogenbosch, the Netherlands
KvK-nr.: 62051717


More information about the freebsd-hackers mailing list