Ensemble monitoring
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-
Comments
Hello.
Can you please publish it as a GitHub repository?
Hey thanks for posting this!
And no matter what you say, I WAS NOT laughing at you (though I may have been laughing)! ![]()
And I totally believe you........
This is a sample of the email output:
Hi Andrew,
Thanks for posting this. I am in the process of coding a similar automated statistics email, so I am reading your code with interest and may well use some of it. My only comment is that since this is for monitoring Ensemble, I actually decided to use Ensemble to implement it. So I have a message class with properties like "Subject" etc. and this is sent to an Operation that uses the Ensemble email adapter to send it. There is also a Service that runs once a day to pull the required information and builds the email message.
Mike