home | photos Mark J Cox, mark@awe.com  

mod_status_xml for Apache 1.3

The status XML module is designed to work in a similar way to the Apache 1.3 mod_status module, allowing a server administrator to find out how well their server is performing. Instead of HTML output, a XML page is presented that gives the current server statistics in an easily readable form. If required this amount of information can be reduced, which is useful if you are periodically capturing the output for example.

Some browsers (IE6,Mozilla 0.9) are able to perform conversions on XML data internally; so the module allows you to give the name of a stylesheet the browser can download and apply to the document. A sample stylesheet is included that gives an almost identical display to the HTML mod_status output.

Rather than a patch to the existing mod_status.c file this has been made into a separate module so that we can extend it in the future to do more things, and because you don't need mod_status if you have mod_status_xml and a recent browser.

Installation

  1. Download mod_status_xml
  2. Run apxs -c -o mod_status_xml.so mod_status_xml.c
  3. Copy mod_status_xml.so into your server modules directory (say in the libexec subdirectory of your server root)
  4. Copy scoreboard.xsl into your document root
  5. Add the following to httpd.conf:
    LoadModule status_xml_module libexec/mod_status.so
    ExtendedStatus On
    <Location /server-status-xml>
       StatusXMLStyleSheet /scoreboard.xsl
       SetHandler server-status-xml
    </Location>
    

Future

  • Finish off the XML to SVG template which can produce graphs from this output, example gif
  • Get stylesheets working with Javascript so columns can be sorted on the fly by simply doing another transformation without any more connections to the server. It only works so far in MSIE
  • Write the same module to Apache 2.0
 Copyright Mark J Cox Aug 2001