View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000054 | My infrastructure | General | public | 2019-03-01 13:58 | 2022-08-15 10:22 |
Reporter | dvl | Assigned To | dvl | ||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Summary | 0000054: check_iocage_host_vs_jails.sh uses wrong path to iocage | ||||
Description | [dan@x8dtu:/var/log] $ ': grep jail /usr/local/etc/nrpe.cfg command[check_host_basejail]=/usr/local/libexec/nagios-custom/check_host_basejail command[check_iocage_host_vs_jails]=/usr/local/bin/sudo /usr/local/libexec/nagios-custom/check_iocage_host_vs_jails.sh command[check_pkg_audit_jail]=/usr/local/bin/sudo /usr/local/libexec/nagios-custom/pkg-audit.sh command[check_py_iocage_host_vs_jails]=/usr/local/bin/sudo /usr/local/libexec/nagios-custom/check_py_iocage_host_vs_jails.sh [dan@x8dtu:/var/log] $ cat /usr/local/libexec/nagios-custom/check_iocage_host_vs_jails.sh #!/bin/sh HOSTVERSION=`/usr/bin/file /bin/sh` JAILS=`/usr/local/sbin/iocage list | /usr/bin/egrep -v '^JID' | /usr/bin/cut -f 2 -w` ERRORS='' for jail in ${JAILS} do JAILVERSION=`/usr/local/sbin/iocage chroot ${jail} 'file /bin/sh'` if [ "${JAILVERSION}" != "${HOSTVERSION}" ] then ERRORS="jail '${jail}' is ${JAILVERSION}" fi done if [ "${ERRORS}" == "" ] then echo 'All jails match the host' exit 0 else echo "WARNING: HOST and jails are NOT in sync: host = ${HOSTVERSION} but ${ERRORS}" exit 2 fi [dan@x8dtu:/var/log] $ /usr/local/sbin/iocage list | /usr/bin/egrep -v '^JID' | /usr/bin/cut -f 2 -w bash: /usr/local/sbin/iocage: No such file or directory [dan@x8dtu:/var/log] $ /usr/local/sbin/iocage list | /usr/bin/egrep -v '^JID' | /usr/bin/cut -f 2 -wwhic^C [dan@x8dtu:/var/log] $ which iocage /usr/local/bin/iocage [dan@x8dtu:/var/log] $ | ||||
Tags | No tags attached. | ||||