uawdijnntqw1x1x1
IP : 216.73.216.74
Hostname : www.vorobey-market.ru
Kernel : Linux www.vorobey-market.ru 3.10.0-514.el7.x86_64 #1 SMP Tue Nov 22 16:42:41 UTC 2016 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
home
/
..
/
usr
/
src
/
..
/
share
/
munin
/
plugins
/
postgres_prepared_xacts_
/
/
#!/usr/bin/perl # -*- cperl -*- # # Copyright (C) 2010 Magnus Hagander, Redpill Linpro AB # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; version 2 dated June, # 1991. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301 USA. =head1 NAME postgres_prepared_xacts_ - Plugin to monitor number of prepared transactions in PostgreSQL. =head1 CONFIGURATION Configuration is done through libpq environment variables, for example PGUSER, PGDATABASE, etc. For more information, see L<Munin::Plugin::Pgsql>. To monitor a specific database, link to postgres_prepared_xacts_<databasename>. To monitor all databases, link to postgres_prepared_xacts_ALL. =head1 SEE ALSO L<Munin::Plugin::Pgsql> =head1 MAGIC MARKERS #%# family=auto #%# capabilities=autoconf suggest =head1 AUTHOR Magnus Hagander <magnus@hagander.net>, Redpill Linpro AB =head1 COPYRIGHT/License. Copyright (c) 2010 Magnus Hagander, Redpill Linpro AB All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 dated June, 1991. =cut use strict; use warnings; use Munin::Plugin::Pgsql; my $pg = Munin::Plugin::Pgsql->new( basename => 'postgres_prepared_xacts_', title => 'PostgreSQL prepared transactions', info => 'Number of transactions', vlabel => 'Transactions', minversion => '8.1', basequery => "SELECT database, count(*) FROM pg_prepared_xacts JOIN pg_database ON datname=database %%FILTER%% GROUP BY database ORDER BY 1", wildcardfilter => "WHERE datname=?", configquery => "SELECT datname,datname FROM pg_database %%FILTER%% ORDER BY 1", suggestquery => "SELECT 'ALL'", autoconfquery => "SELECT (setting::integer > 0),'Prepared transactions not enabled' FROM pg_settings WHERE name='max_prepared_transactions'", graphdraw => 'AREA', stack => 1, ); $pg->Process(); exit(0);
/home/../usr/src/../share/munin/plugins/postgres_prepared_xacts_