Do you have health checks in your web app or web site?

Posted by Pekka on Stack Overflow See other posts from Stack Overflow or by Pekka
Published on 2010-03-09T00:28:53Z Indexed on 2010/03/09 0:51 UTC
Read the original article Hit count: 249

Filed under:
|
|

I have built PHP based "health check" scripts for several projects, but they were always custom-made for the occasion and not written for abstraction as an independent product. I would like to know whether such a solution exists.

What I meam by "health check" is a protected web page that functions much like a suite of unit tests, but on a more operational level, showing red/yellow/green statuses for things like

  • Are the cache directories writable?
  • Is the PHP version correct, are required extensions installed?
  • Is the configuration file protected from writing?
  • Is the database server reachable?
  • Do the key tables exist in the database?
  • Is there enough disk space available?
  • Is the site's front page reachable and renders fully ( = no PHP errors)?
  • Do the project's libraries' MD5 checksums match the original ones?

Do you do this - or parts of it - in your applications and web sites?

Are there any standardized tools for this that bring along all the functionality to perform the tests (ideally as plugins), and just need to be configured accordingly?

Is there a way to set this up using one of the Unit Testing frameworks available for PHP (preferably PHPUnit)? If so, do you know any resources / tutorials outlining how?

© Stack Overflow or respective owner

Related posts about php

Related posts about Maintenance