From 3a30d16dae68f1a79b93e83bee12e82566f5d42f Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Mar 25 2024 19:40:49 +0000 Subject: Merge branch 'crameleon/postfix-queue-metrics-optimize' into 'production' Slightly optimize Postfix spool counting See merge request infra/salt!1604 --- diff --git a/salt/profile/postfix/files/usr/local/libexec/systemd/postfix-queue-size-metrics.sh.j2 b/salt/profile/postfix/files/usr/local/libexec/systemd/postfix-queue-size-metrics.sh.j2 index 5c4c43b..c783eba 100644 --- a/salt/profile/postfix/files/usr/local/libexec/systemd/postfix-queue-size-metrics.sh.j2 +++ b/salt/profile/postfix/files/usr/local/libexec/systemd/postfix-queue-size-metrics.sh.j2 @@ -13,7 +13,7 @@ spool_dir='/var/spool/postfix' then >&2 echo "Checking $queue" printf 'postfix_queue_length{postfix_instance="postfix", queue="%s"} ' "$queue" - find "${spool_dir}/${queue}" -type f | wc -l + find "${spool_dir}/${queue}" -type f -printf \\n | wc -l else >&2 echo "Skipping $queue" fi