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