locked
Monitor Receive Locations using WMI RRS feed

  • Question

  • Hi,

    I'm trying to monitorize when a receive location stops unintentionally.

    My first thought was reading the event viewer and check (periodically)  if any shut down occur, and why! Everything worked fine but, when I run the Windows Service without admin privileges I had an error reading the event viewer (the issue is described here).

    Then, my second option was to use WMI to check the health of my receive location. So I use the same technique like Suspended Messages. There I subscribed a "query" so everytime a message is suspended a trigger is fired and I can manage the error and do what I want (right now, send a email to administration with the error description). I do that using this query: new EventQuery("SELECT * FROM MSBTS_ServiceInstanceSuspendedEvent"));

    Search in the web, and finally find my solution, there's also WMI trigger for receive locations, I have only to subscribe this query "new EventQuery("SELECT * FROM MSBTS_MessageInstanceSuspendedEvent"));". However this is not doing what I want.. no trigger is fired when a receive location stops (password error, for example).

    I know I can make a process to go each and each time to all my receive locations and check which one is disabled (like I found here - Using WMI to Monitor Send Ports and Receive Locations in BizTalk Server MSDN blog), however that is not what I want... With that I can't know why the receive location stopped and when, which is important for me. 

    Is there a way to monitorize my receive locations (in real time), so I can get the error description and the timestap of the error?

    Thanks in advance,

     


    Ricardo Bessa

    Wednesday, July 16, 2014 11:02 AM

Answers

  • Thanks for the explanation.

    I'll try to go to my first solution, reading the event viewer for that particular event. I'll struggle to solve my issue with user permissions, like described in my previous post.


    Ricardo Bessa

    • Marked as answer by Pengzhen Song Wednesday, July 23, 2014 1:20 PM
    Wednesday, July 16, 2014 1:05 PM

All replies

  • This is something you should take up with Microsoft as possible enhancement.

    Remember that all the receive locations are actually implementation of adapter receive handlers. As such there are events and interfaces defined which permit the adapter receive handler to communicate back to the management database about having to disable a receive location. At the same time there is a method which the BizTalk runtime calls to notify the adapter to shutdown. These IMHO currently DO NOT GENERATE WMI Events. If you can get Microsoft to generate events then it might be possible for you to utilize them. So while these events occur and are trapped and handled in the BizTalk Runtime, they are not available for use outside.

    That having said, applications such as BizTalk 360 utilize WMI to perform similar functionality. So maybe they trigger a polling thread specific to each port/handler where they keep retrieving the status at every set polling interval.

    Alternatively you can listen to the EventLog (http://www.codeproject.com/Articles/4857/A-realtime-event-log-monitoring-tool) for specific event id's against specific event logs. So if you build a list of events and match events against your list for whatever action you wish.

    Regards.

    Wednesday, July 16, 2014 11:33 AM
  • Its not possible to get the error report with the WMI script .

    there is an easy way to get BizTalk alerts by using a combination of PowerShell scripting and the built-in Windows Task Scheduler . Please find the link below

    http://social.technet.microsoft.com/wiki/contents/articles/20836.biztalk-server-an-easy-way-to-get-biztalk-alerts.aspx

    Thanks

    Abhishek

    Wednesday, July 16, 2014 11:45 AM
  • Thanks for the explanation.

    I'll try to go to my first solution, reading the event viewer for that particular event. I'll struggle to solve my issue with user permissions, like described in my previous post.


    Ricardo Bessa

    • Marked as answer by Pengzhen Song Wednesday, July 23, 2014 1:20 PM
    Wednesday, July 16, 2014 1:05 PM
  • Easily solved with the free version of our monitoring tool AIMS. You can sign up for free here http://www.aimsinnovation.com/aims-free
    Wednesday, April 12, 2017 1:21 PM