Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Virtual Hosts to NPM parsing #173

Open
robertalexa opened this issue Jan 2, 2024 · 8 comments
Open

Adding Virtual Hosts to NPM parsing #173

robertalexa opened this issue Jan 2, 2024 · 8 comments
Assignees

Comments

@robertalexa
Copy link

Hi,

Firstly, thank you for your project, just having a play with it.

Was wondering if you would be able to include Virtual Hosts, especially important on the Requested Files table. The reason for this is that in my case, NPM is proxying multiple domains/subdomains.

Looking at the documentation this seems to be possible:
image

In case it is needed, here is a line of my NPM logs:

[02/Jan/2024:01:42:36 +0000] - 101 101 - GET https REDACTED_DOMAIN "/api/websocket" [Client 192.168.10.89] [Length 413201] [Gzip -] [Sent-to 192.168.10.11] "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "-"

Thank you in advance!

@xavier-hernandez
Copy link
Owner

@robertalexa my understanding from NPM is that the logs for each individual host is in a different file, proxy-host-*_access.log. The above log sample doesn't have a virtual host. Other logs like NGINX or Apache your able to add that Virtual Host.

I'm not an expert of course. Correct me if I'm wrong.

@robertalexa
Copy link
Author

The log does contain the virtual host, marked as " REDACTED_DOMAIN" for privacy reasons. I am not currently around my pc to give more info about the logs but once i do i will get back to you with regards to file names.

@xavier-hernandez
Copy link
Owner

xavier-hernandez commented Jan 21, 2024

Maybe we're talking about two different things; however, there is a panel named "VIRTUAL HOSTS". It lists the domains.

image

@robertalexa
Copy link
Author

As mentioned in my original post, i am referring to Requested Files table
image

Knowing how many requests in total for a Virtual Host is great, but brings not value when you want to investigate the actual requests. And that is even more important when multiple virtual hosts might have the same resource file.

Same applies for 404s
image

PS: Virtual hosts is populated as expected
image

@xavier-hernandez
Copy link
Owner

It makes sense, but this is out-of-the-box from goaccess. I think this is what your referring too, allinurl/goaccess#1185 ?

I can try some things.

@robertalexa
Copy link
Author

Yes that is right. I believe the feature set is available in goaccess, based on documentation i have provided, which is also referenced in the thread you've provided.

The "feature" however would be on your software to actually include the extra params and display them in tables.

I appreciate your help!

@xavier-hernandez
Copy link
Owner

Looks like I'm left with gibberish in the output... I guess it doesn't work in Docker or at least I don't know how to get it to work. That file continually changes.

The last comment says:

... Though, to be honest, I'm not entirely sure how you would pipe data to the volume. Sorry, you would have to find out how docker gets that data in. Let me know if you have any other questions.

@xavier-hernandez
Copy link
Owner

If you have any idea how to implement it feel free to put in a pull request with the modified code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants