Code Monkey home page Code Monkey logo

Comments (11)

allinurl avatar allinurl commented on June 1, 2024 1

If you don't require a real-time report, you can execute it via cron, for example, every hour, to generate a standalone report without the necessity of a websocket. Just omit the --real-time-html flag.

from goaccess.

allinurl avatar allinurl commented on June 1, 2024

What results are you seeing in your browser's console? Do you see the green dot next to the hamburger menu? Thanks

from goaccess.

idomic avatar idomic commented on June 1, 2024

@allinurl Yes I see the error.
Why do I need a websocket though? I thought it has a file locally (access.log) and it writes the output locally (report.html).
Added a new link since the previous one was down:
https://patient-bread-1052.dev.ploomberapp.io/report

I can see it's complaining on:
WebSocket connection to 'wss://patient-bread-1052.dev.ploomberapp.io:81/' failed:

from goaccess.

idomic avatar idomic commented on June 1, 2024

A bit more details, I have the port set on 81, I didn't set the ws-url (which I think that's why it defaults to that URL).
In nginx I configured the /report to direct to the static report.html file.
I also tried setting these entries according to that issue I found here:

location /report1 {
    proxy_pass http://localhost:81/;
}

location /report1/ws {
    proxy_connect_timeout 7d;
    proxy_send_timeout 7d;
    proxy_read_timeout 7d;
    proxy_pass http://localhost:81;
}

This doesn't seem to work.

from goaccess.

idomic avatar idomic commented on June 1, 2024

I do like it to be real-time though, what am I missing with the websocket? Seems to open it via the proxy nginx?

from goaccess.

allinurl avatar allinurl commented on June 1, 2024

It appears that the client is unable to locate the service on that port. While I'm not completely familiar with the configuration you have in place, there have been several questions about this. Please take a look at this example: GitHub issue #1297, or just run a search within the issues for proxy_pass.

Let me know if that helps.

from goaccess.

idomic avatar idomic commented on June 1, 2024

@allinurl I think I got it to work?
Goaccess report: https://gentle-hat-5180.dev.ploomberapp.io/report
Logs: https://gentle-hat-5180.dev.ploomberapp.io/logs
This is the actual app: https://gentle-hat-5180.dev.ploomberapp.io/

I do see the websocket is up and it doesn't throw that error anymore, I tried connecting to the app a few times but I see the numbers are static? I kept the --real-time-html flag

What I did to make it work was validate that the port are routing to the right place, I had to configure the ws-url to my local proxy_pass: ws://localhost:81/ws

And then in nginx I added this config:

location /ws/ {
            proxy_connect_timeout 7d;
            proxy_send_timeout 7d;
            proxy_read_timeout 7d;
            proxy_pass http://localhost:81;
            proxy_set_header Connection "upgrade";
            proxy_set_header Connection "keep-alive";
            proxy_pass_request_headers on;
            proxy_http_version 1.1;
        }

from goaccess.

idomic avatar idomic commented on June 1, 2024

For some reason the report doesn't show the latest data (after a few tries to log into the app I still see old numbers), so I guess it didn't work. If I take the raw logs from /logs and run it locally, I get 49 unique visitors which tells me the container doesn't update it in real time.

Is there a way to exclude that ELB healthcheck from the count? I saw there's open issue so I assume there isn't.
10.0.25.73 - - [29/Mar/2024:16:15:44 +0000] "GET /healthcheck.html HTTP/1.1" 200 28 "-" "ELB-HealthChecker/2.0"

from goaccess.

allinurl avatar allinurl commented on June 1, 2024

I'm still seeing the same issue: WebSocket connection to 'ws://localhost:81/ws/' failed:. Are you able to observe the green dot on your side?

Regarding the ELB health check, it seems like you could potentially exclude that IP using the -e 10.0.25.73 flag.

from goaccess.

idomic avatar idomic commented on June 1, 2024

Alright I got it to work, I had a container running on my local so I thought I got it although I didn't.
To fix it I changed the localhost to the exact URL: https://red-night-9610.dev.ploomberapp.io/report
I also had to change the port to 443 since our internal network is routing to it via the nginx.
Thanks for the support!

from goaccess.

allinurl avatar allinurl commented on June 1, 2024

Thanks for passing along that info. I'm glad to hear you got it working. Feel free to reopen if necessary.

from goaccess.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.