goaccess-for-nginxproxymanager
goaccess-for-nginxproxymanager copied to clipboard
Adding Virtual Hosts to NPM parsing
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:
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!
@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.
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.
Maybe we're talking about two different things; however, there is a panel named "VIRTUAL HOSTS". It lists the domains.
As mentioned in my original post, i am referring to Requested Files table
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
PS: Virtual hosts is populated as expected
It makes sense, but this is out-of-the-box from goaccess. I think this is what your referring too, https://github.com/allinurl/goaccess/issues/1185 ?
I can try some things.
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!
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.
If you have any idea how to implement it feel free to put in a pull request with the modified code.