Dzahn has submitted this change and it was merged.
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 manifests/role/lists.pp
M modules/mailman/manifests/cron.pp
3 files changed, 7 insertions(+), 17 deletions(-)
Approvals:
jenkins-bot: Verified
Dzahn: Looks good to me, approved
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/manifests/role/lists.pp b/manifests/role/lists.pp
index cae94f3..9a172d6 100644
--- a/manifests/role/lists.pp
+++ b/manifests/role/lists.pp
@@ -116,7 +116,7 @@
nrpe::monitor_service { 'mailman_queue':
description => 'mailman_queue_size',
- nrpe_command => '/usr/bin/sudo -u list
/usr/local/lib/nagios/plugins/check_mailman_queue 25 25 300 25',
+ nrpe_command => '/usr/bin/sudo -u list
/usr/local/lib/nagios/plugins/check_mailman_queue 25 25 25',
}
# on list servers we monitor I/O with iostat
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: merged
Gerrit-Change-Id: I5c25b2f00087ce07457452233ffc0cdb90a9851c
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: John F. Lewis <[email protected]>
Gerrit-Reviewer: Dzahn <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits