X-Git-Url: https://jfr.im/git/munin-plugins.git/blobdiff_plain/2a1c8afae2da3bedf00f9d70d39a5216cce9ae5a..0d8dd5f298c9da590f59ae416e1cb49f222528af:/postfix_mailvolume?ds=sidebyside diff --git a/postfix_mailvolume b/postfix_mailvolume index d2f88ea..d65755d 100755 --- a/postfix_mailvolume +++ b/postfix_mailvolume @@ -124,9 +124,10 @@ if ( $ARGV[0] and $ARGV[0] eq "autoconf" ) { if ( $ARGV[0] and $ARGV[0] eq "config" ) { print "graph_title Postfix bytes throughput\n"; print "graph_args --base 1000 -l 0\n"; - print "graph_vlabel bytes / \${graph_period}\n"; print "graph_scale yes\n"; print "graph_category postfix\n"; + print "graph_vlabel bytes / \${graph_period}\n"; + print "graph_period minute\n"; print "volume.label delivered volume\n"; print "volume.type DERIVE\n"; print "volume.min 0\n"; @@ -138,7 +139,7 @@ if ( $ARGV[0] and $ARGV[0] eq "config" ) { ($pos, $volume_delivered, $serialized_volumes_queue) = restore_state(); -if (!defined($volume_delivered)) { +if (!defined($volume_delivered) || !defined($pos) || !$pos) { # they could be defined but 0 if the old plugin was run # No state file present. Avoid startup spike: Do not read log # file up to now, but remember how large it is now, and next