at my place, we worked around this issue by doing a check_http test on a test page.
For example, we have a basic configuration of an apache server, calling a tomcat located on another server, which is calling a database on another server.
=> we just did a web page that tests the whole chain (ie: a page that calls the database through tomcat) and returns "OK" if everything is fine, and something else if not :))
In the end, the test done by nagios is very simple "check_http -H server -u /test_page.html -s OK"
Hope this helps