This blog post is about how you can automate suspended service instances operations with BizTalk360 automated recovery features. It comes as part of a series of 5 that all discuss different topics around how to effectively benefit from the Automated recovery features of BizTalk360. In this blog, we will cover the fourth part of the series.
- Part 1 – How to deal effectively when your receive locations get disabled
- Part 2 – How to improve service availability
- Part 3 – How to optimize your Windows resources
- Part 4 – How to automate suspended instance operations
- Part 5 – How to automatically clean up unneeded service instances
Importance of monitoring your service instances
In order to have a healthy and safe BizTalk environment, it’s important to keep an eye on the run time service instances and message instances in your BizTalk environment. Typically, BizTalk administrators open the BizTalk admin console and query for instances periodically and act on them like Suspend, Terminate and Resume.
MessageBox Data Monitoring
In MessageBox Data Monitoring, users can configure the queries to monitor the service instances and receive notifications whenever the system detects a violation based on the configured threshold values. Configure the MessageBox schedule in BizTalk360 as follows:
Navigate to: Monitoring -> Data Monitoring -> MessageBox Data -> Add new
To use this feature in your environment, you require a valid license of BizTalk360. The users (either it will be a super user or a normal user has the permission to take action) must have a look at the suspended service instances and take action when required, which is a time consuming and tedious process.
Purpose of MessageBox Data Monitoring
When messages flow into the BizTalk Server, messages get collected in the admin console’s messagebox database. The service instances might move into different stages such as
- Suspended (Resumable)
- Suspended (Non-Resumable)
- Ready to run
- Dehydrated and so on
This will demand a user intervention, which forces the administrator to open the admin console and fix the problem. BizTalk360 solves this problem through Messagebox Data monitoring. By default, Messagebox Data Monitoring monitors your service instance and get it notified if something happens unexpected.
On top of that, BizTalk360 enables you to Resume, Suspend or Terminate the service instances based on either error or warning condition without any manual intervention.
Automating actions against Service Instances
Based on the checkbox Is Action Required, BizTalk360 enables you to automatically perform tasks like terminating instances, resuming instances, and so on. You can define an action such as “Whenever there are Suspended (Non-resumable) service instances during the monitoring time range, the system will automatically terminate them.
Also, in case there are suspended (resumable) instances, the system can automatically Resume these messages.”
Suppose an instance is suspended in a port, then BizTalk360 will try to resume the instances until the configured Number of retries has been met.
What instances will be actioned on
In the MessageBox Data Monitoring, you can act against the services based on,
- Only Query result count (no date/time filter)
- Query result with date/time range
Only Query result count (no date/time filter)
Whenever users select this option, this will execute the query without applying any date time filter it means that all the data will be considered for SQL query execution.
Based on Query result with date/time range
Whenever users select this option, this will apply the Creation Time filter for SQL query execution.
The values configured for setting trigger time, Set Monitoring Times-> At What Time, will be used for the Creation Time filter
For example: When Monitoring frequency is set for an hour, then every execution of the query will consider only 1-hour of data.
If you want to terminate Dehydrated and active service instances which are older than 15 days from the creation of the message. In Messagebox Data Monitoring, to solve that, the user can terminate the dehydrated and active instances with a PowerShell notification channel. Follow the steps below:
- Create a PowerShell script to call the BizTalk360 APIs to check for the dehydrated service instances and terminate them
- Attach this PowerShell script to a notification channel in BizTalk360
- Map this channel to an alarm, so that the PowerShell script will get executed to take action when the alarm is triggered.
Here is the PowerShell script to terminate the dehydrated and active service instances which are older than 15 days in GitHub.
Currently, BizTalk360 offers custom notification channels for the following.
In the fourth article of the series, we have seen how to setup monitoring for your suspended service instances, and take automatic action on the instances immediately. You will be notified in your preferred way of communication when violations happen in your environment. In the upcoming blog, we will highlight few other capabilities of BizTalk360 as well.
Meanwhile, if you wish to evaluate our product or take a product tour. Take a quick go by signing up for our free trial. Our consultant team will provide you a free demo.