powa-team / powa-web

PoWA user interface
http://powa.readthedocs.io/
73 stars 31 forks source link

New version 4.2.0 not yet published for Docker? #191

Closed Hadrien-DELAITRE closed 1 month ago

Hadrien-DELAITRE commented 6 months ago

Hi!

Got an issue with the powa-web:

image

I'm using it with the docker image : powateam/powa-web-git

I'm a bit confused :(

rjuju commented 6 months ago

Hi,

The powa-web-git image is mostly intended for testing purpose, the regular powa-web image is the one you should be using. I can confirm that version 4.2.x has not been uploaded on docker, but it seems to be the same for the powa-archivist images, so while they're both outdated they should still be compatible with each other.

Are you using a non-docker setup for the postgres / powa-archivist part and only rely on docker for the UI?

rjuju commented 6 months ago

I just realized that I forgot to mention that my personal laptop died not long ago, and I'm for now stuck with my work laptop which is on ARM, so I unfortunately can't upload them myself as it would only work on ARM machines (I think there are a few dependencies with binaries).

@pgiraud could you take care of that?

We should be able to automate that for at least powa-web as it doesn't have any outside repository dependency, I will try to work on that soon.

Hadrien-DELAITRE commented 6 months ago

Are you using a non-docker setup for the postgres / powa-archivist part and only rely on docker for the UI?

I made a mistake in using remote mode I think: I thought powa could remotely connect to my database server. But from what I understand, the powa database must be on the same postgres server of the database that I want to analyze.

rjuju commented 6 months ago

I don't think you made a mistake using the remote mode. You indeed need to install powa (and all stat extensions) on the remote server(s), but it won't store any data. It's only there to present a stable view of the data, dealing with any change in pg_stat_statements and other view.

All the metrics will be stored on the repository server. powa-collector is in charge of that: it connects to the remote server(s), retrieves the data from pg_stat_statements and other and store that on the repository server.

Hadrien-DELAITRE commented 6 months ago

You indeed need to install powa (and all stat extensions) on the remote server(s), but it won't store any data.

OK, but as I can see on the following schema: image

"Powa db" is on the same server that "db1". I guess that db1 is my database that I need to analyze. BUT, with the current docker configuration : https://github.com/powa-team/powa-podman/blob/master/compose/powa_remote_mode.yml

The remote-primary container is isolated from my personal postgres container that handles my database (db1). I can't see how I can make the remote-primary container handles the powa extension with my database (db1).

rjuju commented 6 months ago

I think there's some kind of misunderstanding here. You need to install powa, pg_stat_statements and any wanted extension on the remote server(s) you want to monitor with powa. In the picture above it's a dedicated database to keep things clean but nothing would prevent you to install those in db1 database or any other database. Those extensions track metrics internally and globally, so any query executed on any database will be seen in pg_stat_statements, even if the extension is installed on another database.

What you can't do is install powa and pg_stat_statements on a server and then hope that powa will see metrics on a totally unrelated server that don't have those extensions.

Hadrien-DELAITRE commented 6 months ago

What I meant is that the proposed configuration of the docker-compose file does not allow installing powa, pg_stat_statements and any wanted extension on a remote server (handled by another container) on which a database already exists.

It seems to me that with the proposed configuration I have to connect to the "remote-primary" container to create/import my personal database.

rjuju commented 6 months ago

ah, well yes definitely. But the repository clearly states

Those images are not intended for production usage, USE AT YOUR OWN RISK.

and for the compose files

Those files are intended for doing tests and not for production use. They're also mainly thought as template that can be adapted depending on your needs.

You can modify to specify your existing instance instead of remote-primary host, and also remove the remote-standby one.

Hadrien-DELAITRE commented 6 months ago

OK, so it's clearer to me, thank you for your time. So I will reuse part of your configuration and customize the rest.

Thanks a lot!

rjuju commented 6 months ago

Great, I hope it will be easy. Let me know if there's anything I can change on the compose files to help this kind of scenario, or just make the documentation a bit more clear.

rjuju commented 6 months ago

FYI @pgiraud just uploaded the latest version of all images on docker hub, including powa-web 4.2.0