powa-team / powa

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

Powa-web Multi databases #76

Closed Laghzaoui closed 8 years ago

Laghzaoui commented 8 years ago

Hi, With Powa-web 3.0.0, can we configure powa-web.conf file with multi databases in multi servers ? Thanks a lot !

daamien commented 8 years ago

yes that's possible.

1- Install powa-archivist on each PostgreSQL instance http://powa.readthedocs.io/en/latest/powa-archivist/index.html

2- setup powa-web and configure the servers parameter to connect to each instance : http://powa.readthedocs.io/en/latest/powa-web/index.html

Laghzaoui commented 8 years ago

Thanks for your replay So, one powa-web.conf file for all databases ? Can you show an example please ?

daamien commented 8 years ago

Yes you need to install powa-web only once.

There's an example here for the confirguration:
https://github.com/dalibo/powa-web/blob/master/powa-web.conf-dist

rjuju commented 8 years ago

To be a little more accurate, you can specify as many instances as you want in this configuration file. In the UI, for each instance, you'll see the data related to any database present on this instance on which there's some activity.

You have to split all entries with a comma, eg.:

servers={
  'production': {
    'host': '10.0.0.1',
    'port': '5432',
    'database': 'powa'
  },
  'dev': {
    'host': '10.1.0.10',
    'port': '5432',
    'database': 'powa'
  }
}
Laghzaoui commented 8 years ago

It works , thanks for all :)