From d7ed15d2dd6537658e7a98a3fc6074b7048c6c64 Mon Sep 17 00:00:00 2001 From: "thorsten.spille" Date: Fri, 9 Feb 2024 22:37:33 +0100 Subject: [PATCH] Fix logging, remove exclude list --- bashclub-zsync/usr/bin/bashclub-zsync | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bashclub-zsync/usr/bin/bashclub-zsync b/bashclub-zsync/usr/bin/bashclub-zsync index 85b12e7..df70e82 100644 --- a/bashclub-zsync/usr/bin/bashclub-zsync +++ b/bashclub-zsync/usr/bin/bashclub-zsync @@ -196,15 +196,15 @@ for zvol in $($ssh $sshcipher $sshport $source "zfs get -H -o name,value,source fi else exclude_list="${exclude_list}\t${name}\n" - if [[ $(echo $zvol | $grep "local") ]]; then - checkzfs_filter="!#$name|$checkzfs_filter" - fi +# if [[ $(echo $zvol | $grep "local") ]]; then +# checkzfs_filter="!#$name|$checkzfs_filter" +# fi fi done checkzfs_filter=${checkzfs_filter::-1} log "$include_list" log "$exclude_list" -log "$checkzfs_headline\ncheckzfs_filter=$checkzfs_filter" +log "$checkzfs_headline\ncheckzfs_filter=$checkzfs_filter\n" if ! $zfs list $target > /dev/null 2>&1 ; then log "[DEBUG] $target does not exist. Creating..." @@ -315,6 +315,7 @@ done if [ $checkzfs_disabled -eq 0 ]; then log "[INFO] Running checkzfs..." echo "<<>>" > /tmp/${checkzfs_spool_maxage}_${checkzfs_prefix} + if [[ $debug == "-v" ]]; then log "[DEBUG] Command:\n$checkzfs --source $source --output checkmk --threshold $checkzfs_max_age --maxsnapshots $checkzfs_max_snapshot_count --prefix $checkzfs_prefix --filter $checkzfs_filter >> /tmp/${checkzfs_spool_maxage}_${checkzfs_prefix}"; fi $checkzfs --source $source --output checkmk --threshold $checkzfs_max_age --maxsnapshots $checkzfs_max_snapshot_count --prefix $checkzfs_prefix --filter $checkzfs_filter >> /tmp/${checkzfs_spool_maxage}_${checkzfs_prefix} if [ $checkzfs_spool -eq 0 ]; then $mv /tmp/${checkzfs_spool_maxage}_${checkzfs_prefix} /var/lib/check_mk_agent/spool/