2007-12-15 12:20:22 +01:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Plugin to count the qmail queue
|
|
|
|
#
|
|
|
|
# Magic markers - optional - used by installation scripts and
|
|
|
|
# munin-config:
|
|
|
|
#
|
|
|
|
#%# family=manual
|
|
|
|
#%# capabilities=autoconf
|
|
|
|
|
|
|
|
if [ "$1" = "autoconf" ]; then
|
|
|
|
echo "yes"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$1" = "config" ]; then
|
|
|
|
|
|
|
|
cat <<EOT
|
|
|
|
graph_title Qmail queue stats
|
|
|
|
graph_args --base 1000 -l 0
|
|
|
|
graph_vlabel mails in queue
|
2017-02-24 20:20:32 +01:00
|
|
|
graph_category mail
|
2007-12-15 12:20:22 +01:00
|
|
|
queue.label queue
|
|
|
|
queue.type GAUGE
|
|
|
|
queue.min 0
|
|
|
|
EOT
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo -n "queue.value " && /usr/bin/find $queue/mess/ -type f -print | /usr/bin/wc -l
|