mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 02:51:03 +00:00
Moved mailman-queue-check to the mailman folder
This commit is contained in:
parent
d58231ff51
commit
59ecf3f15e
1 changed files with 0 additions and 0 deletions
59
plugins/mail/mailman-queue-check
Executable file
59
plugins/mail/mailman-queue-check
Executable file
|
@ -0,0 +1,59 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Plugin to monitor mailman queue
|
||||
#
|
||||
# Parameters understood:
|
||||
#
|
||||
# config (required)
|
||||
#
|
||||
# Author: Ricardo F. <rikr@esdebian.org>
|
||||
#
|
||||
#
|
||||
#%# family=manual
|
||||
#%# capabilities=
|
||||
#
|
||||
|
||||
|
||||
|
||||
if [ "$1" = "config" ]; then
|
||||
echo "graph_title Mailman Queue"
|
||||
echo "graph_args --base 1000 -l 0"
|
||||
echo "archive.label Archive"
|
||||
echo "archive.draw LINE2"
|
||||
echo "bounces.label Bounces"
|
||||
echo "bounces.draw LINE2"
|
||||
echo "commands.label Commands"
|
||||
echo "commands.draw LINE2"
|
||||
echo "in.label In"
|
||||
echo "in.draw LINE2"
|
||||
echo "news.label News"
|
||||
echo "news.draw LINE2"
|
||||
echo "out.label Out"
|
||||
echo "out.draw LINE2"
|
||||
echo "retry.label Retry"
|
||||
echo "retry.draw LINE2"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
dir_mailman='/var/lib/mailman/qfiles'
|
||||
result="archive bounces commands in news out retry"
|
||||
j=0
|
||||
|
||||
for i in $result
|
||||
do
|
||||
array[$j]=`find "$dir_mailman/$i" -type f | wc -l`
|
||||
j=`expr $j + 1`
|
||||
done
|
||||
|
||||
|
||||
echo "archive.value ${array[0]}"
|
||||
echo "bounces.value ${array[1]}"
|
||||
echo "commands.value ${array[2]}"
|
||||
echo "in.value ${array[3]}"
|
||||
echo "news.value ${array[4]}"
|
||||
echo "out.value ${array[5]}"
|
||||
echo "retry.value ${array[6]}"
|
||||
exit 0
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue