xavier-hernandez / goaccess-for-nginxproxymanager

GoAccess Docker Image for Nginx Proxy Manager and more...
https://hub.docker.com/r/xavierh/goaccess-for-nginxproxymanager
MIT License
532 stars 39 forks source link

Ignore certain logs? #132

Closed rdavey228 closed 1 year ago

rdavey228 commented 1 year ago

Not sure if I've missed it in the manual but is there a way to exclude certain proxy hosts?

By default it pulls in all hosts which is great. But lets say I want a Goaccess page per virtual host rather than all virtual hosts on one dashboard

It would be nice if goaccess lets you select a virtual host on the dashboard then update the graphs to only display results for that host but it doesn't at this stage and maybe it never will.

Id deploy a goaccess container for each virtual host but would need to be able to exclude hosts so it doesn't pull all of them in. I have a lot of virtual hosts and it can be a lot having every host on a single dashboard.

Can this be done?

xavier-hernandez commented 1 year ago

You didn't miss it. Currently you can only exclude IPs. I think the best for this is to include rather than exclude. I think excluding would be a larger list. I'm thinking right now and maybe you can just pass the number of the proxy file. Each virtual host is assigned a number.

rdavey228 commented 1 year ago

I agree,

Include would be better than exclude.

I know if you run CUSTOM you can specify the log files you want to use in the goaccess.conf file but I like your setup where its all configured for you using environment variables in the docker-compose file.

It would be great if we would configure the V-Hosts we want to include in the same way.

xavier-hernandez commented 1 year ago

FYI... working on this

xavier-hernandez commented 1 year ago

Almost done with this but life got in the way.

xavier-hernandez commented 1 year ago

@rdavey228 so finally got around to this. Currently the "develop" image has the new code, if you want to give it a try. Otherwise it should be merged into the latest Friday, 3/24, morning.

Update your docker-compose file to use xavierh/goaccess-for-nginxproxymanager:develop. If you've previously used the develop image please pull the latest like below.

docker pull xavierh/goaccess-for-nginxproxymanager:develop

Here is an example of the line you need to add, depending on which proxy host you want to include. Its comma delimited.

rdavey228 commented 1 year ago

Nice one! Great work!

I wont get a chance to try it out this week so ill probably catch it next week after its been merged in.

Do you see any issues running multiple instances of the environment dedicating each instance of the container to its own proxy host so each proxy host is kept separate on its own instance of goaccess?

xavier-hernandez commented 1 year ago

This is now in the latest release.

rdavey228 commented 1 year ago

@xavier-hernandez - Works brilliantly! Thanks for your hard work on this!

Makes reading the dashboards for multiple hosts far easier to distinguish which traffic came from where.

Would make much more sense if Goaccess built in a filtering system then we wouldn't have had to do it this way!