]> jfr.im git - munin-plugins.git/blobdiff - postfix_mailvolume
update
[munin-plugins.git] / postfix_mailvolume
index d2f88ea6840f1437b80673ba67844e3f404cee83..d65755dba10e9f39c0d409f9ebae9dcc2fbd03c1 100755 (executable)
@@ -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