Skip to content

Commit

Permalink
zpool_influxdb: move to libexec dir
Browse files Browse the repository at this point in the history
Move zpool_influxdb to libexec dir, as per following discussions:

openzfs#11156
openzfs#11160

Signed-off-by: Pavel Snajdr <[email protected]>
  • Loading branch information
snajpa committed Nov 27, 2020
1 parent 7a0e7b8 commit 313eb5a
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cmd/zpool_influxdb/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include $(top_srcdir)/config/Rules.am

bin_PROGRAMS = zpool_influxdb
libexec_PROGRAMS = zpool_influxdb

zpool_influxdb_SOURCES = \
zpool_influxdb.c
Expand Down
4 changes: 2 additions & 2 deletions cmd/zpool_influxdb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ be restarted to read the config-directory files.
# # Read metrics from zpool_influxdb
[[inputs.execd]]
# ## default installation location for zpool_influxdb command
command = ["/usr/bin/zpool_influxdb", "--execd"]
command = ["/usr/libexec/zpool_influxdb", "--execd"]

## Define how the process is signaled on each collection interval.
## Valid values are:
Expand All @@ -264,7 +264,7 @@ be restarted to read the config-directory files.
# # Read metrics from zpool_influxdb
[[inputs.exec]]
# ## default installation location for zpool_influxdb command
commands = ["/usr/bin/zpool_influxdb"]
commands = ["/usr/libexec/zpool_influxdb"]
data_format = "influx"
```

Expand Down
2 changes: 1 addition & 1 deletion cmd/zpool_influxdb/telegraf.d/exec_zpool_influxdb.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# # Read metrics from zpool_influxdb
[[inputs.exec]]
# ## default installation location for zpool_influxdb command
commands = ["/usr/local/bin/zpool_influxdb"]
commands = ["/usr/local/libexec/zpool_influxdb"]
# ## Timeout for each command to complete.
# timeout = "5s"
#
Expand Down
2 changes: 1 addition & 1 deletion cmd/zpool_influxdb/telegraf.d/execd_zpool_influxdb.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# # Read metrics from zpool_influxdb
[[inputs.execd]]
# ## default installation location for zpool_influxdb command
command = ["/usr/local/bin/zpool_influxdb", "--execd"]
command = ["/usr/local/libexec/zpool_influxdb", "--execd"]

## Define how the process is signaled on each collection interval.
## Valid values are:
Expand Down
3 changes: 2 additions & 1 deletion rpm/generic/zfs.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -444,11 +444,12 @@ systemctl --system daemon-reload >/dev/null || true
%{_bindir}/raidz_test
%{_bindir}/zgenhostid
%{_bindir}/zvol_wait
%{_bindir}/zpool_influxdb
# Optional Python 2/3 scripts
%{_bindir}/arc_summary
%{_bindir}/arcstat
%{_bindir}/dbufstat
# Auxiliary executables
%{_libexecdir}/zpool_influxdb
# Man pages
%{_mandir}/man1/*
%{_mandir}/man5/*
Expand Down
2 changes: 2 additions & 0 deletions scripts/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export EXTRA_ENVIRONMENT
all-local:
-$(SED) -e '\|^export BIN_DIR=|s|$$|@abs_top_builddir@/bin|' \
-e '\|^export SBIN_DIR=|s|$$|@abs_top_builddir@/bin|' \
-e '\|^export LIBEXEC_DIR=|s|$$|@abs_top_builddir@/bin|' \
-e '\|^export ZTS_DIR=|s|$$|@abs_top_srcdir@/tests|' \
-e '\|^export SCRIPT_DIR=|s|$$|@abs_top_srcdir@/scripts|' \
$(abs_top_srcdir)/scripts/common.sh.in >common.sh
Expand All @@ -72,6 +73,7 @@ clean-local:
install-data-hook:
-$(SED) -e '\|^export BIN_DIR=|s|$$|@bindir@|' \
-e '\|^export SBIN_DIR=|s|$$|@sbindir@|' \
-e '\|^export LIBEXEC_DIR=|s|$$|@libexecdir@|' \
-e '\|^export ZTS_DIR=|s|$$|@datadir@/@PACKAGE@|' \
-e '\|^export SCRIPT_DIR=|s|$$|@datadir@/@PACKAGE@|' \
$(abs_top_srcdir)/scripts/common.sh.in \
Expand Down
1 change: 1 addition & 0 deletions scripts/common.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export BIN_DIR=
export SBIN_DIR=
export ZTS_DIR=
export SCRIPT_DIR=
export LIBEXEC_DIR=

# General commands
export ZDB=${ZDB:-$SBIN_DIR/zdb}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function check_for
}

# by default, all stats and histograms for all pools
log_must zpool_influxdb > $tmpfile
log_must $LIBEXEC_DIR/zpool_influxdb > $tmpfile

STATS="
zpool_io_size
Expand Down

0 comments on commit 313eb5a

Please sign in to comment.