xref: /freebsd/sys/contrib/openzfs/man/man8/zpool_influxdb.8 (revision 43a5ec4eb41567cc92586503212743d89686d78f)
1.\"
2.\" CDDL HEADER START
3.\"
4.\" The contents of this file are subject to the terms of the
5.\" Common Development and Distribution License (the "License").
6.\" You may not use this file except in compliance with the License.
7.\"
8.\" You can obtain a copy of the license at
9.\" https://opensource.org/licenses/CDDL-1.0
10.\" See the License for the specific language governing permissions
11.\" and limitations under the License.
12.\"
13.\" When distributing Covered Code, include this CDDL HEADER in each
14.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15.\" If applicable, add the following below this CDDL HEADER, with the
16.\" fields enclosed by brackets "[]" replaced with your own identifying
17.\" information: Portions Copyright [yyyy] [name of copyright owner]
18.\"
19.\" CDDL HEADER END
20.\"
21.\" Copyright 2020 Richard Elling
22.\"
23.Dd May 26, 2021
24.Dt ZPOOL_INFLUXDB 8
25.Os
26.
27.Sh NAME
28.Nm zpool_influxdb
29.Nd collect ZFS pool statistics in InfluxDB line protocol format
30.Sh SYNOPSIS
31.Nm
32.Op Fl e Ns | Ns Fl -execd
33.Op Fl n Ns | Ns Fl -no-histogram
34.Op Fl s Ns | Ns Fl -sum-histogram-buckets
35.Op Fl t Ns | Ns Fl -tags Ar key Ns = Ns Ar value Ns Oo , Ns Ar key Ns = Ns Ar value Oc Ns …
36.Op Ar pool
37.
38.Sh DESCRIPTION
39.Nm
40produces InfluxDB-line-protocol-compatible metrics from zpools.
41Like the
42.Nm zpool
43command,
44.Nm
45reads the current pool status and statistics.
46Unlike the
47.Nm zpool
48command which is intended for humans,
49.Nm
50formats the output in the InfluxDB line protocol.
51The expected use is as a plugin to a
52metrics collector or aggregator, such as Telegraf.
53.Pp
54By default,
55.Nm
56prints pool metrics and status in the InfluxDB line protocol format.
57All pools are printed, similar to the
58.Nm zpool Cm status
59command.
60Providing a pool name restricts the output to the named pool.
61.
62.Sh OPTIONS
63.Bl -tag -width "-e, --execd"
64.It Fl e , -execd
65Run in daemon mode compatible with Telegraf's
66.Nm execd
67plugin.
68In this mode, the pools are sampled every time a
69newline appears on the standard input.
70.It Fl n , -no-histogram
71Do not print latency and I/O size histograms.
72This can reduce the total
73amount of data, but one should consider the value brought by the insights
74that latency and I/O size distributions provide.
75The resulting values
76are suitable for graphing with Grafana's heatmap plugin.
77.It Fl s , -sum-histogram-buckets
78Accumulates bucket values.
79By default, the values are not accumulated and the raw data appears as shown by
80.Nm zpool Cm iostat .
81This works well for Grafana's heatmap plugin.
82Summing the buckets produces output similar to Prometheus histograms.
83.It Fl t , Fl -tags Ar key Ns = Ns Ar value Ns Oo , Ns Ar key Ns = Ns Ar value Oc Ns …
84Adds specified tags to the tag set.
85No sanity checking is performed.
86See the InfluxDB Line Protocol format documentation for details on escaping
87special characters used in tags.
88.It Fl h , -help
89Print a usage summary.
90.El
91.
92.Sh SEE ALSO
93.Xr zpool-iostat 8 ,
94.Xr zpool-status 8 ,
95.Lk https://github.com/influxdata/influxdb "InfluxDB" ,
96.Lk https://github.com/influxdata/telegraf "Telegraf" ,
97.Lk https://grafana.com "Grafana" ,
98.Lk https://prometheus.io "Prometheus"
99