Enhance grapher a lot

This commit is contained in:
Jan Philipp Timme 2018-05-04 15:57:45 +02:00
parent 835398751a
commit 9511d5b2b8
1 changed files with 54 additions and 3 deletions

View File

@ -17,11 +17,42 @@ for index in ${!period_filenames[*]}; do
# Draw the graphs
# Outbound mail
rrdtool graph $GRAPHDIR/$filename \
# Logfile
rrdtool graph $GRAPHDIR/log_$filename \
--start $startparam \
--step 60 \
--title "Mail statistics for `hostname -f` - $text" \
--title "Mail logfile statistics on `hostname -f` - $text" \
--vertical-label "lines/minute" \
-h 200 -w 800 --slope-mode \
DEF:log_lines_total=$RRDFILE:log_lines_total:AVERAGE \
DEF:log_lines_smtp=$RRDFILE:log_lines_smtp:AVERAGE \
DEF:log_lines_smtpd=$RRDFILE:log_lines_smtpd:AVERAGE \
AREA:log_lines_total#00000033 \
LINE:log_lines_total#000000:'total' \
AREA:log_lines_smtp#FF000055 \
LINE:log_lines_smtp#FF0000:'smtp' \
AREA:log_lines_smtpd#0000FF77 \
LINE:log_lines_smtpd#0000FF:'smtpd'
# Connections
rrdtool graph $GRAPHDIR/connections_$filename \
--start $startparam \
--step 60 \
--title "Inbound mail connections on `hostname -f` - $text" \
--vertical-label "connections/minute" \
-h 200 -w 800 --slope-mode \
DEF:mi_connects=$RRDFILE:mi_connects:AVERAGE \
DEF:mi_connects_tls=$RRDFILE:mi_connects_tls:AVERAGE \
AREA:mo_deferred#CC000033 \
LINE:mo_deferred#CC0000:'total' \
AREA:mo_sent#00FF0055 \
LINE:mo_sent#00FF00:'with tls'
# Outbound mail
rrdtool graph $GRAPHDIR/mail_out_$filename \
--start $startparam \
--step 60 \
--title "Outbound mail on `hostname -f` - $text" \
--vertical-label "mails/minute" \
-h 200 -w 800 --slope-mode \
DEF:mo_sent=$RRDFILE:mo_sent:AVERAGE \
@ -46,4 +77,24 @@ for index in ${!period_filenames[*]}; do
AREA:mo_bncd_reputation#FF00FFFF \
LINE:mo_bncd_reputation#FF00FFFF:'reputation event'
# Inbound mail
rrdtool graph $GRAPHDIR/mail_in_$filename \
--start $startparam \
--step 60 \
--title "Inbound mail on `hostname -f` - $text" \
--vertical-label "mails/minute" \
-h 200 -w 800 --slope-mode \
DEF:mi_accept=$RRDFILE:mi_accept:AVERAGE \
DEF:mi_reject=$RRDFILE:mi_reject:AVERAGE \
DEF:mi_proxy_accept=$RRDFILE:mi_proxy_accept:AVERAGE \
DEF:mi_proxy_reject=$RRDFILE:mi_proxy_reject:AVERAGE \
AREA:mi_accept#00FF0033 \
LINE:mi_accept#00FF00:'accept' \
AREA:mi_proxy_accept#00880055 \
LINE:mi_proxy_accept#008800:'proxy-accept' \
AREA:mi_reject#FF000077 \
LINE:mi_reject#FF0000:'reject' \
AREA:mi_proxy_reject#88000077 \
LINE:mi_proxy_reject#880000:'proxy-reject'
done