monitoring-plugins: missing --with-*-command build options?
Hi, when using e.g. icinga mailq check, so /usr/lib/monitoring-plugins/check_mailq
it expects to have e.g. PATH_TO_MAILQ
or PATH_TO_SUDO
defined in utils.pm
.
Looking in there we see a bunch of empty variables
## updated by autoconf
$PATH_TO_SUDO = "";
$PATH_TO_RPCINFO = "" ;
$PATH_TO_LMSTAT = "" ;
$PATH_TO_SMBCLIENT = "" ;
$PATH_TO_MAILQ = "";
$PATH_TO_QMAIL_QSTAT = "";
Looking into some old Debian bug report https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=905318 it looks the APKBUILD needs to set e.g. --with-sudo-command="/usr/bin/sudo"
and --with-mailq-command="/usr/bin/mailq"
See also Debian list of build time options: https://salsa.debian.org/nagios-team/monitoring-plugins/-/blob/master/debian/rules#L83
edit: seems they are determined at build time from the binary if it's available. See also Arch Linux PKGBUILD (also check makedepends) https://gitlab.archlinux.org/archlinux/packaging/packages/monitoring-plugins/-/blob/main/PKGBUILD?ref_type=heads#L31 and utils.pm from there:
## updated by autoconf
$PATH_TO_SUDO = "/usr/bin/sudo";
$PATH_TO_RPCINFO = "/usr/bin/rpcinfo" ;
$PATH_TO_LMSTAT = "" ;
$PATH_TO_SMBCLIENT = "/usr/bin/smbclient" ;
$PATH_TO_MAILQ = "/usr/bin/mailq";
$PATH_TO_QMAIL_QSTAT = "";
$PATH_TO_SNMPGET = "/usr/bin/snmpget";