darold / pgbadger

A fast PostgreSQL Log Analyzer
http://pgbadger.darold.net/
PostgreSQL License
3.45k stars 348 forks source link

Having issues with POST requests to private PEV2 site from pgBadger reports #810

Open kmoradha opened 7 months ago

kmoradha commented 7 months ago

I've set up a private installation of the PEV2 demo, using their provided index.html file, so that I can visualize explain plans using this excellent tool without have to upload details outside of my network.

I've configured my pgBadger reports to send the explain plans (generated via auto_explain) to my private PEV2 demo installation (via POST requests) using the --explain-url argument, but the demo install doesn't seem to be accepting the parameters, i.e. when I click "Explain Plan" from the pgBadger report, I just get the blank "New Plan" form in PEV2.

I'm using latest pgBadger and latest PEV2 (1.8.0), and I've used my browser dev panel to confirm that the request parameters are being sent in the POST request. I've also tried this with both Firefox and Chrome.

Any ideas what I'm doing wrong here? I know I can just copy-and-paste the explain plan from the pgBadger report to the "New Plan" form, but I was hoping for a little integration magic. :)

(I know this is more likely to be a PEV2 question, and I've asked it there as well...but I thought the community here might have relevant experience with how to get this working.)

darold commented 6 months ago

Does it works if you use https://explain.dalibo.com/ instead of your local installation?

kmoradha commented 6 months ago

Does it works if you use https://explain.dalibo.com/ instead of your local installation?

No, when I try that using --explain-url, clicking on an explain plan link results in a "Method Not Allowed" error page. I was getting the same thing with my private install when I initially used Nginx to host the PEV2 index.html (which seems to be a common outcome with Nginx, based on Google search)...when I switched to Apache HTTP Server, that error was eliminated, but the explain plan data was not posted to the form (I did use the browser Dev tools to confirm that the data was being sent via the POST request, though).