-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Display VirtualHosts for logs #23
Comments
@simark there are plans to separate the data based on virtualhost. However, what I'm thinking from your comment above is to have a sub node underneath each request file that displays the virtualhost. i.e.:
Thoughts? |
Putting vhosts as subnodes of pages wouldn't really make sense, unless you know that both domain are aliases/point to the same documentroot. I have for example a couple of users who have wordpress installed, so I get a lot of /wp-login.php, but they are different pages. |
@simark, goaccess cannot group stats by virtual host or folder. maybe in a future version that will be possible. best, |
@abgit, your comment made me remember about the command split-logfile, which is bundled with Apache and does just that. For now, I hacked it by adding the parsing of vhost in parse_format. I then concatenate the vhost and the page. My pages look like "www.example.com/page.php", which produces the desired result. Would you be interested in a contribution that does that but cleaner (add a vhost field and column in the interface)? I suppose the hash tables that keep track of statistics would need to be augmented to use structures as keys instead of only strings, in order to aggregate by (vhost, request). |
For reference, here is what I did: simark@0ff83b8 |
@simark, Contributions are welcome. Just share some thoughts on how the interface would look like. |
+1000 to this future. Without it goaccess is totally unusable for most of our environments but with it it will be killer app :) Split log files isn't way because we want see how our servers are behaving and what hosts are most demanding. |
I looked into it but I think that it is only quick hack to achieve at least something. It will be better to design it to use vhosts. One of approaches easy to add can be to add columns with vhost to views requested files and requested static files or better to switch very metric to take numbers from whole server or per virtual host. It will be great to add another metric with request per vhosts (not dependent on uri). Another approach is simply to switch whole view asi i.e. in apachetop. This wont' be small change probably but will be really useful. |
@kepi: What I had in mind, an option "group by virtualhost", which would add a column in the relevant views if selected. I started to work on code to group on arbitrary values, but I am not sure how far I went. This would allow quite flexible views. By grouping only by vhost, you could get your number of requests per vhost. I'll try to get back into it soon and upload something useful, even if not completely finished. |
I like the idea of grouping vhosts. What I was thinking is to have some sort of interactive interface (perhaps a vertical tab interface for each vhost?) within both, request, and static requests which will essentially group requests by virtualhost. Any thoughts? |
Grouping can be nice. Only keep in mind that one can have many virtual hosts (we have couple of hundreds i.e.) so show only top of them as in normal view for requests. |
I think that the table "Requested files (Pages-URL)" should stay as it is. If you only want to have the results of a single vhost, you can either in Apache/Nginx settings very easily set you vhost to write a separate log per virtualhost or you can with simple grep/awk do some pre-processing of the access.log file before you pipe it to Goaccess. However at the moment Goaccess seems to discard the vhost data completely. I think Goaccess should have an additional table titled "Top sever hostname" which would list all the different virtual hostnames found in the log like this:
If Goaccess had a table like this, admins could see what domains are used in the requests and maybe it whay make a mistake in grep/awk and wrong multiple unwanted hostnames slip in, they would notice them from this table. |
Added the ability to parse virtual hosts and a new panel to display metrics per virtual host. This was shipped in v0.9.5. As @ottok pointed out, it displays data on a separate panel, e.g.,
#117 should cover the filtering by vhost, and other fields. |
When I look at the top request files for a log with VirtualHosts, it is not very useful to know about a path if I don't know its associated VirtualHost. Is it possible to display a column with this information? I am using version 0.6 from the Debian repo.
Thanks!
The text was updated successfully, but these errors were encountered: