Package: munin-plugins-core
Version: 2.0.25-1
Severity: minor
Tags: patch

Dear Maintainer,

The postgres_querylength_ plugin provides two values: The length or
rather age of the oldest transaction and the age of the oldest query. In
the graph these are stacked.

I don't think stacking these values is useful: The sum of these two
values isn't meaningful. In many cases the oldest query is part of the
oldest transaction, so it is counted twice that way, but even if it
isn't you have to mentally subtract the age of the oldest query from the
displayed value for the age of the oldest transaction to get the real
age of the oldest transaction.

I think it is much more useful to display those two values individually:
That way you can immediately see both values and you can also see
whether a long-running transaction consists of a single long-running
query (if both lines overlap) or many small ones (if the query line is
somewhere near the ordinate).

The attached one-line patch fixes the problem.

*** End of the template - remove these template lines ***


-- System Information:
Debian Release: 8.6
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable'), (400, 'testing')
Architecture: i386 (i686)

Kernel: Linux 3.16.0-4-686-pae (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages munin-plugins-core depends on:
ii  munin-common  2.0.25-1
ii  perl          5.20.2-3+deb8u6

Versions of packages munin-plugins-core recommends:
ii  libnet-snmp-perl  6.0.1-2

Versions of packages munin-plugins-core suggests:
pn  conntrack                     <none>
pn  libcache-cache-perl           <none>
ii  libdbd-mysql-perl             4.028-2+deb8u2
ii  libnet-dns-perl               0.81-2+deb8u1
ii  libnet-netmask-perl           1.9021-1
pn  libnet-telnet-perl            <none>
ii  libxml-parser-perl            2.41-3
ii  python                        2.7.9-1
ii  ruby                          1:2.1.5+deb8u2
ii  ruby1.8 [ruby-interpreter]    1.8.7.358-7.1+deb7u3
ii  ruby1.9.1 [ruby-interpreter]  1.9.3.194-8.1+deb7u2
ii  ruby2.1 [ruby-interpreter]    2.1.5-2+deb8u3

-- no debconf information
diff --git a/plugins/node.d/postgres_querylength_ b/plugins/node.d/postgres_querylength_
index aed2c5f..7e1c493 100755
--- a/plugins/node.d/postgres_querylength_
+++ b/plugins/node.d/postgres_querylength_
@@ -101,7 +101,7 @@ my $pg = Munin::Plugin::Pgsql->new(
     ],
     suggestquery =>
         "SELECT datname FROM pg_database WHERE datallowconn AND NOT datistemplate AND NOT datname='postgres' UNION ALL SELECT 'ALL' ORDER BY 1 LIMIT 10",
-    stack => 1
+    stack => 0
 );
 
 $pg->Process();

Reply via email to