Workflow Service Monitor

See my previous post about number of workflow instances sitting in the queue to be processed. You can via a single query determine how many instances are waiting and usually this number is very close to a zero – this is how WorkflowService operates. Unless it is broken and does not process the queue. I found it very beneficial to know when the workflow service is down so I can be there fixing the problem before my clients come to me reporting the problem.

So with some PowerShell you can set up a simple monitoring: if queue has more than X number of instances waiting -> send an email to whoever is responsible. Have this running on a schedule every 5 minutes and viola – you have an early warning system for health of your HR.Net.

Well, that was my initial idea with PowerShell. When I decided to try if the target server has all the PowerShell modules installed I discovered that it barely has anything installed on it. And installing all the required dependencies were not really an option. So I quickly opened Visual Studio and made a 100-line application in C# that does pretty much what I describe above with a bit more meat behind it – some error logging and email with the list of workflows waiting. And some other nice to have stuff.

I’m not going to publish the source code here as it has some bits that I can’t disclose – because NDA. But if you are interested in such monitoring application, please get in touch, I’ll remove all sensitive parts and will provide instructions how to install it.

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *