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.
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.
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]
22 .\" Copyright 2020 Richard Elling
26 zpool_influxdb \- collect zpool statistics in influxdb line protocol format
30 \fBzpool_influxdb\fR [--execd] [--no-histogram] [--sum-histogram-buckets]
31 [--tags key=value] [pool]
32 \fBzpool_influxdb\fR --help
35 The \fBzpool_influxdb\fR command produces influxdb line protocol compatible
36 metrics from zpools. Like the \fBzpool\fR command, \fBzpool_influxdb\fR
37 reads the current pool status and statistics. Unlike the \fBzpool\fR
38 command which is intended for humans, \fBzpool_influxdb\fR formats the
39 output in influxdb line protocol. The expected use is as a plugin to a
40 metrics collector or aggregator, such as telegraf.
42 By default, \fBzpool_influxdb\fR prints pool metrics and status in the
43 influxdb line protocol format. All pools are printed, similar to
44 the \fBzpool status\fR command. Providing a pool name restricts the
45 output to the named pool.
47 Like the \fBzpool\fR command, \fBzpool_influxdb\fR uses internal data
48 structures that can change over time as new ZFS releases are made.
49 Therefore, the \fBzpool_influxdb\fR command must be compiled against the
50 ZFS source. It is expected that later releases of ZFS includes compatible
51 \fBzpool_influxdb\fR and \fBzpool\fR commands.
55 \fB\--execd\fR, \fB-e\fR
56 Run in daemon mode compatible with telegraf`s \fBexecd\fR plugin.
57 In this mode, the pools are sampled every time there is a [return] on stdin.
58 Once a sample printed, \fBzpool_influxdb\fR waits for another [return].
59 When run on a terminal, use [ctrl+C] to exit.
61 \fB\--no-histogram\fR, \fB-n\fR
62 Do not print latency and I/O size histograms. This can reduce the total
63 amount of data, but one should consider the value brought by the insights
64 that latency and I/O size distributions provide. The resulting values
65 are suitable for graphing with grafana's heatmap plugin.
67 \fB--sum-histogram-buckets\fR, \fB-s\fR
68 Accumulates bucket values. By default, the values are not accumulated and
69 the raw data appears as shown by \fBzpool iostat\fR. This works well for
70 grafana's heatmap plugin. Summing the buckets produces output similar to
71 prometheus histograms.
73 \fB--tags\fR, \fB-t\fR
74 Adds specified tags to the tag set. Tags are key=value pairs and multiple
75 tags are separated by commas. No sanity checking is performed.
76 See the InfluxDB Line Protocol format documentation for details on escaping
77 special characters used in tags.
79 \fB\--help\fR, \fB\-h\fR
80 Print a usage summary.
87 Influxdb https://github.com/influxdata/influxdb
89 Telegraf https://github.com/influxdata/telegraf
91 Grafana https://grafana.com
93 Prometheus https://prometheus.io