Server Density Beta Update #4 – Apache Monitoring

April 6, 2009
by David Mytton

Over the weekend we pushed out an update to our server monitoring application, Server Density. This includes an update to the sd-agent to enable Apache monitoring. You can now view the number of requests per second along with the busy and idle worker count for a single Apache installation.

The new feature is available immediately but requires you to update your agent. For users who have downloaded or updated since the agent update on April 2nd, all you need to do is execute the command

python agent.py update

Users who downloaded prior to the 2nd April will need to run through the installation steps again for each of their servers.

All users need to add a new line to their config.cfg file:

apache_status_url: http://www.example.com/server-status/?auto

You should replace the URL with the address to your Apache status page. Note that you must append ?auto to the end of your URL to ensure the correct output is generated for the agent to parse.

Important: Even if you do not wish to use the Apache monitoring feature, you need to add the above line to your config.cfg file leaving the example URL in place.

The new feature makes use of the mod_status output that is available in Apache. This is not enabled by default and requires configuring your Apache instance to display the status output at a specific URL.

You need to add the following directive to your Apache httpd.conf file:

ExtendedStatus On

And then set up a Location handler by adding lines similar to the following:

<Location /server-status>
SetHandler server-status
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Location>

You should replace the IP address 127.0.0.1 with your server’s public IP address. This will allow requests only originating from the server itself which is suitable for allowing access from the agent. If you want to be able to access the status page from your browser you would need to add your own public IP in. The status page can then be accessed from http://www.example.com/server-status where example.com is your server’s name / IP.

The correct address for the sd-agent in the above example would be

http://www.example.com/server-status?auto

Check the Apache manual for more details.

Other changes

In addition to the new feature mentioned above, we have rewritten the updater mechanism in sd-agent. Previously it would just download the latest tar file from our website without any error or version checking. Now, it will check our servers to make sure there is a new version available and if so, download each new file individually. The files will have a checksum computed to ensure no corruption occurred and only if all the files pass those tests will the existing agent files be overwritten. This reduces unnecessary downloading of agent files when there is no new update and makes sure the new version downloaded will work. We are also able to add new files easily by providing a file list that the agent reads and uses to download.

If you are a developer and interested in the output our server gives, you can view the raw data at http://www.serverdensity.com/agentupdate/.

If you have any questions about or problems with this update, don’t hesitate to contact us.

5 Responses leave one →
  1. June 9, 2009

    Any reason why this wouldn’t work with lighttpd?

    • June 9, 2009

      If lighttpd has the same server status output as Apache then it will work. I don’t know whether this is the case or not.

Trackbacks & Pingbacks

  1. Server Density Public Beta Open « Boxed Ice Blog
  2. Python auto update mechanism « Boxed Ice Blog
  3. Server Density Beta Update #5 - No data alerts « Boxed Ice Blog

Leave a Reply

Note: You can use basic XHTML in your comments. Your email address will never be published.

Subscribe to this comment feed via RSS