]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.sbin/prometheus_sysctl_exporter/prometheus_sysctl_exporter.8
THIS BRANCH IS OBSOLETE, PLEASE READ:
[FreeBSD/FreeBSD.git] / usr.sbin / prometheus_sysctl_exporter / prometheus_sysctl_exporter.8
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
36 Prometheus is a monitoring system that gathers metrics from its targets
37 by fetching them through HTTP GET requests.
38 Metrics are identified by a name and an optional set of labels.
39 Sample values are required to be numerical.
40 .Pp
41 The
42 .Nm
43 utility prints the values of sysctl nodes to standard output,
44 formatted such that they can be scraped by Prometheus directly.
45 By default,
46 it prints metrics for all numerically representable nodes in the sysctl
47 namespace.
48 It is also possible to limit output to a smaller number of metrics by
49 specifying one or more prefixes as arguments.
50 .Pp
51 Metrics printed by this utility are named
52 .Ql sysctl_ ,
53 followed by the name of the sysctl node having its
54 .Ql .\&
55 separators replaced by
56 .Ql _ .
57 Components on which it is desirable to aggregate (e.g.,
58 names of devices) are omitted from the metric's name,
59 but are appended as labels instead.
60 .Pp
61 There are two different methods for exporting the output of
62 .Nm
63 to Prometheus.
64 The first method is to periodically invoke this utility through
65 .Xr cron 8
66 and store its output in a textfile.
67 The metrics in this textfile can then be served over HTTP using the
68 Prometheus node exporter's textfile collector.
69 The second method is to run this utility through
70 .Xr inetd 8 .
71 TCP port 9124 has been allocated for this purpose.
72 .Pp
73 The following options are available:
74 .Bl -tag -width indent
75 .It Fl d
76 Print descriptions of metrics when available.
77 .It Fl g
78 Gzip compresses the HTTP response body.
79 .It Fl h
80 Precede the output with a HTTP response header.
81 This 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
90 Prometheus project:
91 .Pa https://prometheus.io/ .
92 .Pp
93 Prometheus exposition formats:
94 .Pa https://prometheus.io/docs/instrumenting/exposition_formats/ .
95 .Pp
96 Prometheus node exporter:
97 .Pa https://github.com/prometheus/node_exporter .
98 .Pp
99 Prometheus default port allocations:
100 .Pa https://github.com/prometheus/prometheus/wiki/Default-port-allocations .
101 .Sh HISTORY
102 .Nm
103 first appeared in
104 .Fx 12.0 .
105 .Sh AUTHORS
106 .An Nuxi : Pa https://nuxi.nl/ .