powa-team / powa

PostgreSQL Workload Analyzer
http://powa.readthedocs.io/
PostgreSQL License
764 stars 57 forks source link

PoWA config file location #36

Closed abessifi closed 9 years ago

abessifi commented 9 years ago

Hi, I wonder if there is a way to load the configuration file powa.conf from a giving location (e.g /etc/powa/). Am not a Perl developer, but I think that the path to config file is hard coded, which is not good. Am I wrong ? In lib/Powa.pm (line 22): my $config_file = $self->home . '/powa.conf';

rjuju commented 9 years ago

Hi,

Yes the path to the powa.conf file is for now hard coded. I guess we could add some environnement variables like conf_path and conf_file to allow overloading this hard-coded value.

If that's ok for you, I'll work on a patch for this soon.

Regards.

abessifi commented 9 years ago

Yeap, that seems OK. Thanks.

rjuju commented 9 years ago

Fixed in commit 28095535d292a05e2007133b96b1c4a7dc709e3e.

Can you give it a try ?