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