X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=mailtest-check;fp=mailtest-check;h=599d4b6a4157ab0ddc31e74b58b0766e8cc61bc4;hb=cd8ada3f2923a3937e212d79748623b003cad62e;hp=036aeff1a2faf981367d7ff69f9ebb98cff26a58;hpb=c3c34e71256cc51ad87bd48e447c33f960d070bf;p=distro-setup diff --git a/mailtest-check b/mailtest-check index 036aeff..599d4b6 100755 --- a/mailtest-check +++ b/mailtest-check @@ -28,11 +28,6 @@ getspamdpid() { done fi } -pr() { - if $doprom && [[ -e /var/lib/prometheus/node-exporter ]]; then - cat >>/var/lib/prometheus/node-exporter/mailtest-check.prom.$$ - fi -} #### begin arg processing #### @@ -81,6 +76,7 @@ esac main() { + local -a unexpected_spamd_results missing_dnswl last_usec case $HOSTNAME in bk) folders=(/m/md/{expertpathologyreview.com,amnimal.ninja}/testignore) @@ -291,8 +287,10 @@ EOF ;; esac done - pr <>$path + done + for l in "${missing_dnswl[@]}"; do + printf "%s\n" "$l" >>$path + done + for l in "${last_usec[@]}"; do + printf "%s\n" "$l" >>$path + done + mv $path $dir/mailtest-check.prom # note: node_textfile_mtime_seconds will tell us when this last happened. useful for debugging. fi }