]> jfr.im git - munin-plugins.git/commitdiff
postfix fixes
authorJohn Runyon <redacted>
Thu, 28 Sep 2023 23:00:05 +0000 (18:00 -0500)
committerJohn Runyon <redacted>
Thu, 28 Sep 2023 23:00:05 +0000 (18:00 -0500)
postfix_mailstats
postfix_mailvolume

index 24776348302a40ea8891f6e9508ae423e88d7a42..ec967a8f265565fbcc53a3129dccb66b9ab5f07e 100755 (executable)
@@ -115,7 +115,6 @@ if ( $ARGV[0] and $ARGV[0] eq "config" ) {
        print "graph_args --base 1000 -l 0\n";
        print "graph_vlabel mails / \${graph_period}\n";
        print "graph_scale  no\n";
-       print "graph_total  Total\n";
        print "graph_category postfix\n";
        print "graph_period minute\n";
        print "messages.label messages\n";
index d2f88ea6840f1437b80673ba67844e3f404cee83..2d5afb12e2237442526c7ccd7ea0f492075c1263 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 eq 0) { # 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