mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
Fixing multiple typos and indentation
This commit is contained in:
parent
b32ff11c61
commit
96223fc7a5
@ -1,13 +1,13 @@
|
|||||||
#!/usr/bin/perl -w
|
#!/usr/bin/perl -w
|
||||||
|
|
||||||
# re-write of python version of pgbouncer stats
|
# re-write of python version of pgbouncer stats
|
||||||
# data from stats, pools (cleint, server)
|
# data from stats, pools (client, server)
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use Munin::Plugin;
|
use Munin::Plugin;
|
||||||
use DBD::Pg;
|
use DBD::Pg;
|
||||||
|
|
||||||
# check that multigraph is avaailable
|
# check that multigraph is available
|
||||||
need_multigraph();
|
need_multigraph();
|
||||||
# get the script name
|
# get the script name
|
||||||
my $plugin_name = $Munin::Plugin::me;
|
my $plugin_name = $Munin::Plugin::me;
|
||||||
@ -57,7 +57,7 @@ if (defined($ARGV[0]))
|
|||||||
print "graph_args --base 1000\n"; # numbers not bytes
|
print "graph_args --base 1000\n"; # numbers not bytes
|
||||||
print "graph_vlabel Average connections\n";
|
print "graph_vlabel Average connections\n";
|
||||||
print "graph_scale no\n"; # so we do not print "micro, milli, kilo, etc"
|
print "graph_scale no\n"; # so we do not print "micro, milli, kilo, etc"
|
||||||
print "graph_category pgbouncer\n";
|
print "graph_category pgbouncer\n";
|
||||||
print $pool_name."_avg_req.type GAUGE\n";
|
print $pool_name."_avg_req.type GAUGE\n";
|
||||||
print $pool_name."_avg_req.label Avg Req\n";
|
print $pool_name."_avg_req.label Avg Req\n";
|
||||||
print $pool_name."_avg_req.min 0\n";
|
print $pool_name."_avg_req.min 0\n";
|
||||||
@ -67,7 +67,7 @@ if (defined($ARGV[0]))
|
|||||||
print "graph_title PgBouncer $pool_name average query time\n";
|
print "graph_title PgBouncer $pool_name average query time\n";
|
||||||
print "graph_args --base 1000\n"; # numbers not bytes
|
print "graph_args --base 1000\n"; # numbers not bytes
|
||||||
print "graph_vlabel Average time per query (microseconds)\n";
|
print "graph_vlabel Average time per query (microseconds)\n";
|
||||||
print "graph_category pgbouncer\n";
|
print "graph_category pgbouncer\n";
|
||||||
print $pool_name."_avg_query.type GAUGE\n";
|
print $pool_name."_avg_query.type GAUGE\n";
|
||||||
print $pool_name."_avg_query.label Avg Time\n";
|
print $pool_name."_avg_query.label Avg Time\n";
|
||||||
print $pool_name."_avg_query.min 0\n";
|
print $pool_name."_avg_query.min 0\n";
|
||||||
@ -77,7 +77,7 @@ if (defined($ARGV[0]))
|
|||||||
print "graph_title PgBouncer $pool_name average bytes received/sent\n";
|
print "graph_title PgBouncer $pool_name average bytes received/sent\n";
|
||||||
print "graph_args --base 1024\n"; # numbers in bytes
|
print "graph_args --base 1024\n"; # numbers in bytes
|
||||||
print "graph_vlabel Average bytes received (-)/sent (+)\n";
|
print "graph_vlabel Average bytes received (-)/sent (+)\n";
|
||||||
print "graph_category pgbouncer\n";
|
print "graph_category pgbouncer\n";
|
||||||
# bytes received
|
# bytes received
|
||||||
print $pool_name."_avg_recv.type GAUGE\n";
|
print $pool_name."_avg_recv.type GAUGE\n";
|
||||||
print $pool_name."_avg_recv.label Avg received\n";
|
print $pool_name."_avg_recv.label Avg received\n";
|
||||||
@ -144,7 +144,7 @@ if (defined($ARGV[0]))
|
|||||||
print "graph_title PgBouncer $pool_name maximum waiting time\n";
|
print "graph_title PgBouncer $pool_name maximum waiting time\n";
|
||||||
print "graph_args --base 1000\n"; # numbers not bytes
|
print "graph_args --base 1000\n"; # numbers not bytes
|
||||||
print "graph_vlabel Maximum wait time (seconds)\n";
|
print "graph_vlabel Maximum wait time (seconds)\n";
|
||||||
print "graph_category pgbouncer\n";
|
print "graph_category pgbouncer\n";
|
||||||
print $pool_name."_maxwait.type GAUGE\n";
|
print $pool_name."_maxwait.type GAUGE\n";
|
||||||
print $pool_name."_maxwait.label Wait Time\n";
|
print $pool_name."_maxwait.label Wait Time\n";
|
||||||
print $pool_name."_maxwait.min 0\n";
|
print $pool_name."_maxwait.min 0\n";
|
||||||
@ -172,7 +172,7 @@ foreach my $get ('pools', 'stats')
|
|||||||
# first defines the pool
|
# first defines the pool
|
||||||
if ($data[0] eq $pool_name)
|
if ($data[0] eq $pool_name)
|
||||||
{
|
{
|
||||||
# print values for the stats: average reqeust, average query time, bytes in/out
|
# print values for the stats: average request, average query time, bytes in/out
|
||||||
if ($get eq 'stats')
|
if ($get eq 'stats')
|
||||||
{
|
{
|
||||||
print "multigraph ".$plugin_name."_".$get."_avg_req\n";
|
print "multigraph ".$plugin_name."_".$get."_avg_req\n";
|
||||||
@ -214,11 +214,11 @@ pgbouncer_ is a plugin to get the pool and stat values for a single pgbouncer po
|
|||||||
|
|
||||||
=head1 APPLICATION
|
=head1 APPLICATION
|
||||||
|
|
||||||
perl and DBD::Pg is required, and pgbounce must been installed with a correct setup access for a stat account
|
perl and DBD::Pg is required, and pgbouncer must been installed with a correct setup access for a stat account
|
||||||
|
|
||||||
=head1 CONFIGURATION
|
=head1 CONFIGURATION
|
||||||
|
|
||||||
the plugin that will be run needs to have the pool name after the plguin base name.
|
the plugin that will be run needs to have the pool name after the plugin base name.
|
||||||
|
|
||||||
=head2 plugin configuration
|
=head2 plugin configuration
|
||||||
|
|
||||||
@ -251,7 +251,7 @@ The plugin will output 5 graphs in the group pgbouncer
|
|||||||
|
|
||||||
This graph will show the average bytes sent and received by the pgbouncer for this pool
|
This graph will show the average bytes sent and received by the pgbouncer for this pool
|
||||||
|
|
||||||
=head2 Avaerage connections
|
=head2 Average connections
|
||||||
|
|
||||||
This graph will show the average amount of connections to the pgbouncer for this pool
|
This graph will show the average amount of connections to the pgbouncer for this pool
|
||||||
|
|
||||||
@ -271,7 +271,7 @@ This graph shows the server connections to pgbouncer for this pool. The followin
|
|||||||
|
|
||||||
=head2 Max wait
|
=head2 Max wait
|
||||||
|
|
||||||
how long the oldest cllient the queue has waited, should be always 0
|
how long the oldest client the queue has waited, should be always 0
|
||||||
|
|
||||||
=head1 ACKNOWLEDGEMENTS
|
=head1 ACKNOWLEDGEMENTS
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user