Attached is a simple maven project containing a single servlet which can be installed into the IdP package in the lib directory. web.xml needs to be modified to serve the servlet. Loadbalancers and Nagios should look for the word "AVAILABLE". Simple HTTP availability check should also suffice because the page will throw a server error when Terracotta is non-operational. The page will also dynamically handle the use case where Terracotta has been removed from the boot loader when running the IdP node in isolation (although the terracotta jar files probably will still be required to be installed).
Here is an example configuration in web.xml. It mirrors the functionality of the built-in shibboleth status servlet. Be sure to add relevant IP ranges for your Nagios and/or loadbalancer hosts which you want to have access to the link.
<!-- Servlet for deep IdP aliveness checking. -->
<!-- Space separated list of CIDR blocks allowed to access the status page -->
The pom.xml may need to be modified to suit your installed version of the Shibboleth IdP and/or your version of Terracotta. Terracotta has been found very stable in the 3.5.x series. The default pom.xml contains configuration for TC 3.5.1 and a commented out block for TC 3.5.4. Any other version of TC is up to you to figure out how to compile into it, but because the API is so basic, the compiled jar file is likely to work even if you don't use exactly the same version numbers.
Terracotta might need to have the toolkit module installed via tim-get.sh. You should have something that looks like terracotta-toolkit-1.2-3.1.0.jar somewhere in the modules of the Terracotta installation. This jar file will likely need to be copied into the shibboleth installer installation along with the maven compiled jar file from the attached project. Again, depending on your version of installed software, the version numbers in the filename may be different.