Answered by:
Biztalk Power shell script to monitor suspended messages for particular application

Question
-
Hi,
I have a requirement to create mail alert for particular application if any of the messages gets suspended.
And I have came across Power shell script which gets track of suspended message and send alerts through mail based on eventlog.
$getEventLog = Get-Eventlog -log application -after ((get-date).AddHours(-4)) -EntryType Error | Where-Object {($_.Source -eq 'BizTalk Server')}
Is there way to alert only for paticular application/port?
Your timely help would be much appreciated.
Monday, February 1, 2016 12:17 PM
Answers
-
Hi,
I would consider buying an off-the shelve product for this requirement. And BizTalk360 would be a good option. Unless you lack budget and are required to build it yourself to have a fit for purpose solution. However, building it yourself will require a few PowerShell statements, connection to mailserver, ectera, which can be time consuming.
Kind Regards,
Steef-Jan Wiggers (Microsoft Azure MVP)
BizTalk
- Proposed as answer by Rachit SikroriaModerator Tuesday, February 2, 2016 2:39 AM
- Marked as answer by Angie Xu Thursday, February 18, 2016 4:23 AM
Monday, February 1, 2016 12:25 PMModerator -
While the most recommend solution for this requirement will be the implementation of BizTalk360 or SCOM.
You can try using the stored procedure: Notify the Biztalk Suspended Messages By Email without Promoting any Properties
How to? Refer: Biztalk Suspended Messages Email Notification
Rachit Sikroria (Microsoft Azure MVP)
- Proposed as answer by Rachit SikroriaModerator Tuesday, February 2, 2016 2:39 AM
- Marked as answer by Angie Xu Thursday, February 18, 2016 4:24 AM
Monday, February 1, 2016 1:15 PMModerator -
Apart from BizTalk 360 or SCOM, the most correct way to monitor BizTalk Events is through WMI.
You can create a Windows Service that listens for these Events and takes the appropriate action.
Here are some resources that describe how to do exactly this:
https://mikearnett.wordpress.com/2009/08/05/biztalk-tip-%E2%80%93-wmi-event-watcher/
http://geekswithblogs.net/gwiele/archive/2005/03/16/26469.aspx
BTW, if you follow the SQL sample, you must not modify any BizTalk database. You can run the query from separate database.
- Proposed as answer by Abhishek0127[Abhishek kumar]MVP Monday, February 1, 2016 9:28 PM
- Marked as answer by Angie Xu Thursday, February 18, 2016 4:24 AM
Monday, February 1, 2016 2:56 PMModerator
All replies
-
Hi,
I would consider buying an off-the shelve product for this requirement. And BizTalk360 would be a good option. Unless you lack budget and are required to build it yourself to have a fit for purpose solution. However, building it yourself will require a few PowerShell statements, connection to mailserver, ectera, which can be time consuming.
Kind Regards,
Steef-Jan Wiggers (Microsoft Azure MVP)
BizTalk
- Proposed as answer by Rachit SikroriaModerator Tuesday, February 2, 2016 2:39 AM
- Marked as answer by Angie Xu Thursday, February 18, 2016 4:23 AM
Monday, February 1, 2016 12:25 PMModerator -
While the most recommend solution for this requirement will be the implementation of BizTalk360 or SCOM.
You can try using the stored procedure: Notify the Biztalk Suspended Messages By Email without Promoting any Properties
How to? Refer: Biztalk Suspended Messages Email Notification
Rachit Sikroria (Microsoft Azure MVP)
- Proposed as answer by Rachit SikroriaModerator Tuesday, February 2, 2016 2:39 AM
- Marked as answer by Angie Xu Thursday, February 18, 2016 4:24 AM
Monday, February 1, 2016 1:15 PMModerator -
Apart from BizTalk 360 or SCOM, the most correct way to monitor BizTalk Events is through WMI.
You can create a Windows Service that listens for these Events and takes the appropriate action.
Here are some resources that describe how to do exactly this:
https://mikearnett.wordpress.com/2009/08/05/biztalk-tip-%E2%80%93-wmi-event-watcher/
http://geekswithblogs.net/gwiele/archive/2005/03/16/26469.aspx
BTW, if you follow the SQL sample, you must not modify any BizTalk database. You can run the query from separate database.
- Proposed as answer by Abhishek0127[Abhishek kumar]MVP Monday, February 1, 2016 9:28 PM
- Marked as answer by Angie Xu Thursday, February 18, 2016 4:24 AM
Monday, February 1, 2016 2:56 PMModerator -
Thanks for your suggestions !!Wednesday, February 3, 2016 6:07 AM
-
You can do this for free using the free version of AIMS. It can alert on any event or thresholds set on hosts, ports and orchs etc. The free version supports up to 2 BizTalk servers (same group), check it out at http://www.aimsinnovation.com/aims-free
Thanks,
Marius
Wednesday, April 12, 2017 2:31 PM