How to Collect web server logs from apache incase virtual host?
Have any one collect apache virtual host logs?
My problem is it collect logs from virtual host (multiple access.log) into same device type and same ip address it can't query logs per a virtual host.
How to solve this issue?
thank you in advance.
Sorry for the delay in getting back to you on this issue. I have a workaround for this that might work for you. Basically what you can do is to make a "new" device type for each vhost. Essentially, you will just take the guts of the Apache XML and use it for each "new" device type (vhost).
So, let's say you have 3 vhosts on that server, now you will have the following new devices:
vhost1, vhost2, vhost3 Their corresponding device XMLs will be Apache XMLs but will be named vhost1msg.xml, vhost2msg.xml, and vhost3msg.xml.
You then go and create 3 new File Reader definitions, once fore each vhost device. You then assign these definitions to 3 different File Reader connections, so that you create 3 folders on Envision:
On the server your SFTP agent is set to send the individual access logs to their corresponding folder. As long as 18.104.22.168 is set a a multi-device it should discover these 3 vhosts.
That should do it. I have used this method in the past and it worked.