I want to host a tomcat server that will host 3 web applications. I want to get the total number of requests processed by my server (for any of the three web applications). Is there any log where I can check the total number of requests processed by my server (including HTTP 404 requests)
Note. I can calculate the general requests processed by each individual application and get the total number of requests processed by my server, but the applications deployed in tomcat are third-party, and I can not make any changes to it.
Basically, I am creating a monitoring application for the tomcat server, and I have to provide the general requests filed in the application,
In addition, my first thought was to override the HTTPServletRequest class constructor in servlet-api.jar and set a static counter. since every request is mapped to an HTTPServletRequest object, I assume that it will do the job. But is it worth overloading the HTTPServletRequest or is there an existing solution for this?
source share