[check_postgres] Code to pass all the database into the script
Giles Westwood
giles.westwood at semantico.com
Tue May 26 17:59:30 UTC 2009
line 625
alldb => [1, 'Check all databases'],
line 812
#If alldb is set then run a psql command to find out all the databases
if (defined $opt{alldb}){
my $pg_db;
$pg_db = join(",", map /(\S+)/, qx{$PSQL -l -t});
$pg_db =~ s/template0//;
print $pg_db;
$opt{dbname}[0] = $pg_db;
}
--
Giles Westwood, Systems Administrator,
Semantico, Floor 1, 21-23 Dyke Road, Brighton BN1 3FE
<http://www.semantico.com/>
<mailto:Giles.Westwood at semantico.com>
<tel:+44-1273-358231> <fax:+44-1273-723232>
More information about the Check_postgres
mailing list