xref: /freebsd/usr.sbin/prometheus_sysctl_exporter/prometheus_sysctl_exporter.8 (revision de44cbc21d1bbae8d03df681be5057c5eb37a5d3)
1.\" Copyright (c) 2016 Nuxi, https://nuxi.nl/
2.\"
3.\" Redistribution and use in source and binary forms, with or without
4.\" modification, are permitted provided that the following conditions
5.\" are met:
6.\" 1. Redistributions of source code must retain the above copyright
7.\"    notice, this list of conditions and the following disclaimer.
8.\" 2. Redistributions in binary form must reproduce the above copyright
9.\"    notice, this list of conditions and the following disclaimer in the
10.\"    documentation and/or other materials provided with the distribution.
11.\"
12.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
13.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
16.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
22.\" SUCH DAMAGE.
23.\"
24.\" $FreeBSD$
25.Dd December 18, 2016
26.Dt PROMETHEUS_SYSCTL_EXPORTER 8
27.Os
28.Sh NAME
29.Nm prometheus_sysctl_exporter
30.Nd print kernel state as Prometheus metrics
31.Sh SYNOPSIS
32.Nm prometheus_sysctl_exporter
33.Op Fl dgh
34.Op Ar prefix ...
35.Sh DESCRIPTION
36Prometheus is a monitoring system that gathers metrics from its targets
37by fetching them through HTTP GET requests.
38Metrics are identified by a name and an optional set of labels.
39Sample values are required to be numerical.
40.Pp
41The
42.Nm
43utility prints the values of sysctl nodes to standard output,
44formatted such that they can be scraped by Prometheus directly.
45By default,
46it prints metrics for all numerically representable nodes in the sysctl
47namespace.
48It is also possible to limit output to a smaller number of metrics by
49specifying one or more prefixes as arguments.
50.Pp
51Metrics printed by this utility are named
52.Ql sysctl_ ,
53followed by the name of the sysctl node having its
54.Ql .\&
55separators replaced by
56.Ql _ .
57Components on which it is desirable to aggregate (e.g.,
58names of devices) are omitted from the metric's name,
59but are appended as labels instead.
60.Pp
61There are two different methods for exporting the output of
62.Nm
63to Prometheus.
64The first method is to periodically invoke this utility through
65.Xr cron 8
66and store its output in a textfile.
67The metrics in this textfile can then be served over HTTP using the
68Prometheus node exporter's textfile collector.
69The second method is to run this utility through
70.Xr inetd 8 .
71TCP port 9124 has been allocated for this purpose.
72.Pp
73The following options are available:
74.Bl -tag -width indent
75.It Fl d
76Print descriptions of metrics when available.
77.It Fl g
78Gzip compresses the HTTP response body.
79.It Fl h
80Precede the output with a HTTP response header.
81This flag is required when running this utility through
82.Xr inetd 8 .
83.El
84.Sh SEE ALSO
85.Xr cron 8 ,
86.Xr inetd 8 ,
87.Xr sysctl 8 ,
88.Xr SYSCTL_ADD_NODE_WITH_LABEL 9
89.Pp
90Prometheus project:
91.Pa https://prometheus.io/ .
92.Pp
93Prometheus exposition formats:
94.Pa https://prometheus.io/docs/instrumenting/exposition_formats/ .
95.Pp
96Prometheus node exporter:
97.Pa https://github.com/prometheus/node_exporter .
98.Pp
99Prometheus default port allocations:
100.Pa https://github.com/prometheus/prometheus/wiki/Default-port-allocations .
101.Sh HISTORY
102.Nm
103first appeared in
104.Fx 12.0 .
105.Sh AUTHORS
106.An Nuxi : Pa https://nuxi.nl/ .
107