John F. Lewis has uploaded a new change for review.
https://gerrit.wikimedia.org/r/249037
Change subject: mailman: remove check for out queue [+data cron]
......................................................................
mailman: remove check for out queue [+data cron]
Provides nothing useful, regular increases make it impossible to accurately
detect
an increase. in, bounces and virgin sufficiently handles the need anyway.
Remove the cron on fermium too from root crontab.
Change-Id: I5c25b2f00087ce07457452233ffc0cdb90a9851c
---
M files/icinga/check_mailman_queue
M modules/mailman/manifests/cron.pp
2 files changed, 6 insertions(+), 16 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/37/249037/1
diff --git a/files/icinga/check_mailman_queue b/files/icinga/check_mailman_queue
index a404636..9279e5a 100755
--- a/files/icinga/check_mailman_queue
+++ b/files/icinga/check_mailman_queue
@@ -10,17 +10,16 @@
# /files/icinga/check_mailman_queue <queue limit>
mailman_base="/var/lib/mailman/qfiles"
-FILES="$mailman_base/bounces $mailman_base/in $mailman_base/out
$mailman_base/virgin"
+FILES="$mailman_base/bounces $mailman_base/in $mailman_base/virgin"
queue_limit_bounces=$1
queue_limit_in=$2
-queue_limit_out=$3
-queue_limit_virgin=$4
+queue_limit_virgin=$3
critqueues=0
debug=false
-if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ] || [ -z "$4" ]; then echo "usage:
./check_mailman_queue <queue limit bounces> <queue limit in> <queue limit out>
<queue limit virgin>"; exit 3; fi
+if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ]; then echo "usage:
./check_mailman_queue <queue limit bounces> <queue limit in> <queue limit
virgin>"; exit 3; fi
for f in $FILES
do
@@ -29,9 +28,9 @@
queue_size=$(ls $f|wc -l)
if $debug; then echo "${f}: ${queue_size}"; fi
- if [ $queue_size -gt $queue_limit_bounces ] || [ $queue_size -gt
$queue_limit_in ] || [ $queue_size -gt $queue_limit_out ] || [ $queue_size -gt
$queue_limit_virgin ]
+ if [ $queue_size -gt $queue_limit_bounces ] || [ $queue_size -gt
$queue_limit_in ] || [ $queue_size -gt $queue_limit_virgin ]
then
- if $debug; then echo "CRIT: ${f}: ${queue_size} (thresholds:
bounces: ${queue_limit_bounces} in: ${queue_limit_in} out: ${queue_limit_out}
virgin: ${queue_limit_virgin}"; fi
+ if $debug; then echo "CRIT: ${f}: ${queue_size} (thresholds:
bounces: ${queue_limit_bounces} in: ${queue_limit_in} virgin:
${queue_limit_virgin}"; fi
((critqueues++))
if $debug; then echo "crit queues: ${critqueues}"; fi
fi
@@ -44,7 +43,7 @@
if [ $critqueues -ge 1 ]
then
- echo "CRITICAL: ${critqueues} mailman queue(s) above limits
(thresholds: bounces: ${queue_limit_bounces} in: ${queue_limit_in} out:
${queue_limit_out} virgin: ${queue_limit_virgin})"
+ echo "CRITICAL: ${critqueues} mailman queue(s) above limits
(thresholds: bounces: ${queue_limit_bounces} in: ${queue_limit_in} virgin:
${queue_limit_virgin})"
exit 2
else
echo "OK: mailman queues are below the limits."
diff --git a/modules/mailman/manifests/cron.pp
b/modules/mailman/manifests/cron.pp
index 76ba87d..e0b1049 100644
--- a/modules/mailman/manifests/cron.pp
+++ b/modules/mailman/manifests/cron.pp
@@ -8,14 +8,5 @@
hour => '3',
minute => '0',
}
-
- # temporary cron for statistics on queue data
- cron { 'queue_data':
- ensure => 'present',
- command => '/usr/local/sbin/queue_data -a >> /var/www/qdata.html',
- user => 'root',
- minute => '15',
- }
-
}
--
To view, visit https://gerrit.wikimedia.org/r/249037
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5c25b2f00087ce07457452233ffc0cdb90a9851c
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: John F. Lewis <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits