An unfortunate limitation of the Apache server status page

The Apache web server has a quite useful server status page , that I think everyone running Apache should enable (and then protect access to, because it contains potentially sensitive information). If your server ever gets unusually loaded (or overloaded), you can look at the server status page to try to see what's going on, and if you have a general metrics system you can use tools to automatically collect the information it exposes (such as the Apache exporter for Prometheus ).

As the Apache documentation covers, the server status page offers this information in two forms, a HTML web page that's intended for people and a 'machine readable' version that presents much of the information in plain text in a relatively easy to parse format. The HTML page comes in two versions, a table based version (the default) and a version not using tables (accessed with the no longer documented '?notable' parameter, and I think it may include some extra information in more verbose format but I haven't looked closely). All of this is great, but there's an unfortunate limitation of the server status page, which is that no version of it provides detailed per-request information in an easily processed form.

The reason you might want to process per-request information is to look for patterns in what IP addresses or network areas have a lot of requests currently, or what URLs and URL areas all (or many) of your requests are for. You can get some of this from the Apache log files, but they don't tell you about concurrency except indirectly (and the log files only tell you about requests after they complete, which can take a long time ). When this is happening, you'd like to be able to scrape the server status data into a script that can tell you things like source IP and request distribution from the live data (well, a snapshot of it).

The plain text, machine readable version of the status page doesn't include the normal detailed per-request information, only aggregate data (and the scoreboard), leaving you to parse this information out of the HTML versions. However, neither HTML version makes this easy, because they don't label their HTML with any class or ID information. You're left to know specific information about the structure of the HTML page and where to find the right table and table cells within the HTML. On the good side, this HTML structure is probably not going to change any time soon; my impression is that the output of mod_status is basically frozen for whatever reason; either people don't want to work on it or maybe the current HTML output is considered a de facto API at this point (since people will have written things that parse it).

Even if the HTML and the plain text 'auto' versions of the status page are considered de facto APIs that can't be changed, nothing prevents Apache from adding another parameter and version of the status page that reports per-request information in a machine readable format. But it's probably never going to happen, and even I would consider this a (very) low priority issue for Apache.

(I suspect that there are good, stand-alone programs to parse HTML tables to text format, since that seems like a common need, and maybe programs that extract the per-request information from the Apache server status. But in today's Internet, finding them is another matter.)