xref: /freebsd/sys/contrib/openzfs/man/man8/zpool_influxdb.8 (revision 3ff01b231dfa83d518854c63e7c9cd1debd1139e)
17877fdebSMatt Macy.\"
27877fdebSMatt Macy.\" CDDL HEADER START
37877fdebSMatt Macy.\"
47877fdebSMatt Macy.\" The contents of this file are subject to the terms of the
57877fdebSMatt Macy.\" Common Development and Distribution License (the "License").
67877fdebSMatt Macy.\" You may not use this file except in compliance with the License.
77877fdebSMatt Macy.\"
87877fdebSMatt Macy.\" You can obtain a copy of the license at
97877fdebSMatt Macy.\" https://opensource.org/licenses/CDDL-1.0
107877fdebSMatt Macy.\" See the License for the specific language governing permissions
117877fdebSMatt Macy.\" and limitations under the License.
127877fdebSMatt Macy.\"
137877fdebSMatt Macy.\" When distributing Covered Code, include this CDDL HEADER in each
147877fdebSMatt Macy.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157877fdebSMatt Macy.\" If applicable, add the following below this CDDL HEADER, with the
167877fdebSMatt Macy.\" fields enclosed by brackets "[]" replaced with your own identifying
177877fdebSMatt Macy.\" information: Portions Copyright [yyyy] [name of copyright owner]
187877fdebSMatt Macy.\"
197877fdebSMatt Macy.\" CDDL HEADER END
207877fdebSMatt Macy.\"
217877fdebSMatt Macy.\" Copyright 2020 Richard Elling
2216038816SMartin Matuska.\"
2316038816SMartin Matuska.Dd May 26, 2021
2416038816SMartin Matuska.Dt ZPOOL_INFLUXDB 8
2516038816SMartin Matuska.Os
2616038816SMartin Matuska.
2716038816SMartin Matuska.Sh NAME
2816038816SMartin Matuska.Nm zpool_influxdb
2916038816SMartin Matuska.Nd collect ZFS pool statistics in InfluxDB line protocol format
3016038816SMartin Matuska.Sh SYNOPSIS
3116038816SMartin Matuska.Nm
3216038816SMartin Matuska.Op Fl e Ns | Ns Fl -execd
3316038816SMartin Matuska.Op Fl n Ns | Ns Fl -no-histogram
3416038816SMartin Matuska.Op Fl s Ns | Ns Fl -sum-histogram-buckets
35*3ff01b23SMartin Matuska.Op Fl t Ns | Ns Fl -tags Ar key Ns = Ns Ar value Ns Oo , Ns Ar key Ns = Ns Ar value Oc Ns …
3616038816SMartin Matuska.Op Ar pool
3716038816SMartin Matuska.
3816038816SMartin Matuska.Sh DESCRIPTION
3916038816SMartin Matuska.Nm
4016038816SMartin Matuskaproduces InfluxDB-line-protocol-compatible metrics from zpools.
4116038816SMartin MatuskaLike the
4216038816SMartin Matuska.Nm zpool
4316038816SMartin Matuskacommand,
4416038816SMartin Matuska.Nm
4516038816SMartin Matuskareads the current pool status and statistics.
4616038816SMartin MatuskaUnlike the
4716038816SMartin Matuska.Nm zpool
4816038816SMartin Matuskacommand which is intended for humans,
4916038816SMartin Matuska.Nm
5016038816SMartin Matuskaformats the output in the InfluxDB line protocol.
5116038816SMartin MatuskaThe expected use is as a plugin to a
5216038816SMartin Matuskametrics collector or aggregator, such as Telegraf.
5316038816SMartin Matuska.Pp
5416038816SMartin MatuskaBy default,
5516038816SMartin Matuska.Nm
5616038816SMartin Matuskaprints pool metrics and status in the InfluxDB line protocol format.
5716038816SMartin MatuskaAll pools are printed, similar to the
5816038816SMartin Matuska.Nm zpool Cm status
5916038816SMartin Matuskacommand.
6016038816SMartin MatuskaProviding a pool name restricts the output to the named pool.
6116038816SMartin Matuska.
6216038816SMartin Matuska.Sh OPTIONS
6316038816SMartin Matuska.Bl -tag -width "-e, --execd"
6416038816SMartin Matuska.It Fl e , -execd
6516038816SMartin MatuskaRun in daemon mode compatible with Telegraf's
6616038816SMartin Matuska.Nm execd
6716038816SMartin Matuskaplugin.
6816038816SMartin MatuskaIn this mode, the pools are sampled every time a
6916038816SMartin Matuskanewline appears on the standard input.
7016038816SMartin Matuska.It Fl n , -no-histogram
7116038816SMartin MatuskaDo not print latency and I/O size histograms.
7216038816SMartin MatuskaThis can reduce the total
737877fdebSMatt Macyamount of data, but one should consider the value brought by the insights
7416038816SMartin Matuskathat latency and I/O size distributions provide.
7516038816SMartin MatuskaThe resulting values
7616038816SMartin Matuskaare suitable for graphing with Grafana's heatmap plugin.
7716038816SMartin Matuska.It Fl s , -sum-histogram-buckets
7816038816SMartin MatuskaAccumulates bucket values.
7916038816SMartin MatuskaBy default, the values are not accumulated and the raw data appears as shown by
8016038816SMartin Matuska.Nm zpool Cm iostat .
8116038816SMartin MatuskaThis works well for Grafana's heatmap plugin.
8216038816SMartin MatuskaSumming the buckets produces output similar to Prometheus histograms.
83*3ff01b23SMartin Matuska.It Fl t , Fl -tags Ar key Ns = Ns Ar value Ns Oo , Ns Ar key Ns = Ns Ar value Oc Ns …
8416038816SMartin MatuskaAdds specified tags to the tag set.
8516038816SMartin MatuskaNo sanity checking is performed.
867877fdebSMatt MacySee the InfluxDB Line Protocol format documentation for details on escaping
877877fdebSMatt Macyspecial characters used in tags.
8816038816SMartin Matuska.It Fl h , -help
897877fdebSMatt MacyPrint a usage summary.
9016038816SMartin Matuska.El
9116038816SMartin Matuska.
9216038816SMartin Matuska.Sh SEE ALSO
9316038816SMartin Matuska.Xr zpool-iostat 8 ,
9416038816SMartin Matuska.Xr zpool-status 8 ,
9516038816SMartin Matuska.Lk https://github.com/influxdata/influxdb "InfluxDB" ,
9616038816SMartin Matuska.Lk https://github.com/influxdata/telegraf "Telegraf" ,
9716038816SMartin Matuska.Lk https://grafana.com "Grafana" ,
9816038816SMartin Matuska.Lk https://prometheus.io "Prometheus"
99