First post! In order to somewhat redeem myself for an unnecessary call to support, I've decided to post some classes that I've written to monitor certain metrics inside our Ensemble Live instance (yeah, Kyle, you WERE laughing at me, but it's okay). What the classes do is to run queries and code to get database sizes, status of the mirror, counts of rows in tables such as EnsLib.HL7.Message and Ens.MessageHeader. The data is collected and written to tables and then an email is sent out daily upon completion. I've found this quite useful in keeping an eye on what's going on. It's helped me to spot mirroring issues, as well as database growth that was not anticipated. The main classes run in the Ensemble namespace because we're running a mirrored configuration and I want to get the data for both servers. Only the primary will send the email. The actual email class runs in the namespace that I'm most concerned with monitoring.
To say that my comments in the code are sparse is very generous (I can get lazy sometimes). That said, I'm happy to answer any questions you might have and welcome input for improvements in the code.
Also, there are a couple of items in the code that really don't do anything, but I haven't bothered cleaning them up. It works, why mess with it?
Github link (I think): https://github.com/detrafi/Montoring-