mirror of
https://github.com/m8tin/cis.git
synced 2026-04-02 19:01:30 +02:00
Improved generic monitoring checks for usage of block devides and zfs pools
This commit is contained in:
@@ -32,9 +32,9 @@ function testSpace(){
|
||||
checkOrStartSSHMaster \
|
||||
|| return 1
|
||||
|
||||
local _RESULT="$(ssh -S ${_SOCKET} -p ${_REMOTE_PORT} ${_REMOTE_USER}@${_REMOTE_HOSTNAME_FQDN} 'zpool list -H -o capacity,name')"
|
||||
local _SPACE_USED=$(echo "${_RESULT}" | /usr/bin/tail -n 1 | /usr/bin/cut -f1)
|
||||
local _POOL=$(echo "${_RESULT}" | /usr/bin/tail -n 1 | /usr/bin/cut -f2)
|
||||
local _RESULT="$(ssh -S ${_SOCKET} -p ${_REMOTE_PORT} ${_REMOTE_USER}@${_REMOTE_HOSTNAME_FQDN} 'zpool list -H -o name,capacity')"
|
||||
local _POOL=$(echo "${_RESULT}" | /usr/bin/tail -n 1 | /usr/bin/cut -f1)
|
||||
local _SPACE_USED=$(echo "${_RESULT}" | /usr/bin/tail -n 1 | /usr/bin/cut -f2)
|
||||
|
||||
[ -z "${_SPACE_USED}" ] \
|
||||
&& echo "FAIL#NO value" \
|
||||
|
||||
Reference in New Issue
Block a user