aboutsummaryrefslogtreecommitdiff
path: root/cddl
diff options
context:
space:
mode:
authorMartin Matuska <mm@FreeBSD.org>2021-07-07 17:45:52 +0000
committerMartin Matuska <mm@FreeBSD.org>2021-07-10 10:26:42 +0000
commit804a0608915837eeb3f235a05f93324750770d19 (patch)
tree3a05de05064472ee6834b2cb9fd4b9a9ee7b775b /cddl
parenta7761d19dacd414c8b8269a6cf909ab4528783dc (diff)
zfs: attach zpool_influxdb to build
From the zpool_influxdb.8 manual page: zpool_influxdb produces InfluxDB-line-protocol-compatible metrics from zpools. Like the zpool command, zpool_influxdb reads the current pool status and statistics. Unlike the zpool command which is intended for humans, zpool_influxdb formats the output in the InfluxDB line protocol. The expected use is as a plugin to a metrics collector or aggregator, such as Telegraf. zpool_influxdb is installed into /usr/libexec/zfs/ Differential revision: https://reviews.freebsd.org/D31094 (cherry picked from commit 48b4fe0503282f03d25e23f44109c5cb6d450f7c)
Diffstat (limited to 'cddl')
-rw-r--r--cddl/Makefile2
-rw-r--r--cddl/usr.libexec/Makefile13
-rw-r--r--cddl/usr.libexec/zpool_influxdb/Makefile28
-rw-r--r--cddl/usr.libexec/zpool_influxdb/Makefile.depend31
4 files changed, 73 insertions, 1 deletions
diff --git a/cddl/Makefile b/cddl/Makefile
index 7b9d13146afa..284a370c0167 100644
--- a/cddl/Makefile
+++ b/cddl/Makefile
@@ -3,7 +3,7 @@
.include <src.opts.mk>
SUBDIR= lib .WAIT \
- sbin share usr.bin usr.sbin
+ sbin share usr.bin usr.libexec usr.sbin
SUBDIR.${MK_TESTS}+= tests
diff --git a/cddl/usr.libexec/Makefile b/cddl/usr.libexec/Makefile
new file mode 100644
index 000000000000..6280cbab5766
--- /dev/null
+++ b/cddl/usr.libexec/Makefile
@@ -0,0 +1,13 @@
+# $FreeBSD$
+
+.include <src.opts.mk>
+
+SUBDIR= ${_zpool_influxdb}
+
+.if ${MK_ZFS} != "no"
+_zpool_influxdb= zpool_influxdb
+.endif
+
+SUBDIR_PARALLEL=
+
+.include <bsd.subdir.mk>
diff --git a/cddl/usr.libexec/zpool_influxdb/Makefile b/cddl/usr.libexec/zpool_influxdb/Makefile
new file mode 100644
index 000000000000..2fb22f02ef32
--- /dev/null
+++ b/cddl/usr.libexec/zpool_influxdb/Makefile
@@ -0,0 +1,28 @@
+# $FreeBSD$
+
+ZFSTOP= ${SRCTOP}/sys/contrib/openzfs
+
+.PATH: ${ZFSTOP}/cmd/zpool_influxdb
+.PATH: ${ZFSTOP}/man/man8
+
+PROG= zpool_influxdb
+MAN= zpool_influxdb.8
+BINDIR?= /usr/libexec/zfs
+
+WARNS?= 0
+CSTD= c99
+
+CFLAGS+= \
+ -DIN_BASE \
+ -I${ZFSTOP}/include \
+ -I${ZFSTOP}/lib/libspl/include \
+ -I${ZFSTOP}/lib/libspl/include/os/freebsd \
+ -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h \
+ -DHAVE_ISSETUGID \
+ -include ${SRCTOP}/sys/modules/zfs/zfs_config.h \
+ -DSYSCONFDIR=\"/etc\" \
+ -DPKGDATADIR=\"/usr/share/zfs\"
+
+LIBADD= nvpair spl zfs
+
+.include <bsd.prog.mk>
diff --git a/cddl/usr.libexec/zpool_influxdb/Makefile.depend b/cddl/usr.libexec/zpool_influxdb/Makefile.depend
new file mode 100644
index 000000000000..53090da6e2fc
--- /dev/null
+++ b/cddl/usr.libexec/zpool_influxdb/Makefile.depend
@@ -0,0 +1,31 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ cddl/lib/libavl \
+ cddl/lib/libnvpair \
+ cddl/lib/libumem \
+ cddl/lib/libuutil \
+ cddl/lib/libzfs \
+ cddl/lib/libzfs_core \
+ gnu/lib/csu \
+ include \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/libc \
+ lib/libcompiler_rt \
+ lib/libexpat \
+ lib/libgeom \
+ lib/libmd \
+ lib/libsbuf \
+ lib/libthr \
+ lib/libutil \
+ lib/libz \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif