[postfix-users] queuegraph Zeigt keine Werte an
Manfred Werner
Manfred.Werner at VW-ARN.de
Do Feb 25 11:39:22 CET 2010
die /usr/local/bin/queuegraph-rrd.sh sieht so aus
#!/bin/sh
# output the number of messages in the incoming, active, and deferred
# queues of postfix one per line suitable for use with snmpd/cricket/rrdtool
#
# 2003/01/24 Mike Saunders
# mailqsize was originally written by Vivek Khera. All I did was
# make it update an rrd.
# 2003/04/14 Ralf Hildebrandt
# I bundled this with a modified mailgraph
# 2007/07/28 Ralf Hildebrandt
# find rrdtool using "which"
# change this to the location of rrdtool
RRDTOOL=/usr/bin/rrdtool
# change this to the location you want to store the rrd
RRDFILE=/etc/postfix/mailqueues.rrd
if test ! -x $RRDTOOL ; then
echo "ERROR: $RRDTOOL does not exist or is not executable"
exit
fi
if test ! -f $RRDFILE ; then
echo "Creating RRD file $RRDFILE"
$RRDTOOL create $RRDFILE --step 60 \
DS:active:GAUGE:900:0:U \
DS:deferred:GAUGE:900:0:U \
RRA:AVERAGE:0.5:1:20160 \
RRA:AVERAGE:0.5:30:2016 \
RRA:AVERAGE:0.5:60:105120 \
RRA:MAX:0.5:1:1440 \
RRA:MAX:0.5:30:2016 \
RRA:MAX:0.5:60:105120
fi
#set -x
qdir=`/usr/sbin/postconf -h queue_directory`
active=`find $qdir/incoming $qdir/active $qdir/maildrop -type f -print | wc
-l | awk '{print $1}'`
deferred=`find $qdir/deferred -type f -print | wc -l | awk '{print $1}'`
printf "active: %d\ndeferred: %d\n" $active $deferred
$RRDTOOL update $RRDFILE "N:$active:$deferred"
> Hallo!
>
> Manfred Werner schrieb:
> >> * Manfred Werner Manfred.Werner at VW-ARN.de:
>>>>> Aha, das funktioniert. In welche RRD datei wird eingetragen?
>>>> also wenn ich dem Eintrag in der /srv/www/cgi-bin/queuegraph.cgi
> glauben
> >>> schenken darf:
> >>>
> >>> my $rrd = '/etc/postfix/mailqueues.rrd'
> >> Und im cronjob?
> >>
> >>>>>> # /webroot/default/queuegraph/count.sh
>> In der crontab habe ich die Einträge gesetzt.
>> was meinst Du mit:
>>> Und im cronjob?
>>>>>> # /webroot/default/queuegraph/count.sh ??
>>
>> meinserver: # /webroot/default/queuegraph/count.sh
>> -bash: /webroot/default/queuegraph/count.sh: No such file or directory
> Ralf meinte sicher /usr/local/bin/queuegraph-rrd.sh.
> Was steht da drin?
>
>
>
> Marc
>
> PS: Stop Top-Posting!
> _______________________________________________
> postfix-users mailing list
> postfix-users at de.postfix.org
> http://de.postfix.org/cgi-bin/mailman/listinfo/postfix-users
>
Mehr Informationen über die Mailingliste postfix-users