Customize Queue Alerting
In this microlearning, we will focus on how you can customize your queue alerts by configuring the trigger conditions and thresholds, which raise an alert and notify people when those points are passed. Should you want to learn more about the standard alerting that eMagiz offers, please check out this microlearning. Note that the queue alerting explained in this page is only applicable for eMagiz models that are running the current generation runtime architecture.
Should you have any questions, please contact academy@emagiz.com.
1. Prerequisites
- Basic knowledge of the eMagiz platform
- Basic knowledge of alerting in the eMagiz platform
2. Key concepts
This microlearning focuses on customizing the queue alerts for each environment (i.e., Testing-Acceptance-Production) in your model. By customizing: we mean further configuring the trigger conditions and thresholds of your queues from the general default settings provided by eMagiz, so they better suit your needs and requirements.
- eMagiz applies the same set of triggers to all JMS queues.
- There are four queue trigger options that eMagiz currently provides:
- Consumers check
- Queue load check
- Inactivity check
- Periodic activity check
- Recipients are defined on the queue level.
3. Queue Alerting
3.1 Queue Alerting Overview
In principle, queue alerting refers to the configuration of alerts that work by applying a uniform set of triggers to all queues in your model. By queues here, we mean all queues that are generated by eMagiz and existing in the Create phase of your model. Out-of-the-box, eMagiz provides the default values that are suitable for the topology of each of your model environments (Testing-Acceptance-Production). By topology here, we refer whether your environment is running on single-lane or double-lane setup. In the screenshot below, you can find the overview of your queue alerts by navigating to Manage -> Alerting -> Triggers.
Here, you will find all the queues that are generated by eMagiz and currently existing in the Create phase of your model, along with the trigger conditions and thresholds that are applied to each of these queues. In the following sections, we will discuss how you can tune these queue triggers to your needs.
3.2 Customize Queue Alerting
To customize these queue triggers to better suit your needs, you can click the edit buttons (green paper and pencil buttons) that find at the end of each queue trigger. By doing so, you will get a pop-up page that allows you to further customize the conditions and thresholds of your queue triggers.
- Consumers check
This trigger checks how many processes (consumers) are subscribing to and retrieving messages from a particular queue over the last 10 minutes. It evaluates whether the number of consumers meets the specified threshold. If the number of consumers falls below the "Expected consumers" value, an alert is generated. You can customize this threshold as needed. Additionally, you can specify the instructions to be included in email notifications sent to recipients and in the alert message displayed in the Manage->Alerting->Alerts.
- Queue load check
This trigger checks how many messages are produced on a particular queue and not yet retrieved by any consumers over the last 10 minutes. It evaluates whether the number of messages on the queue is below the specified threshold. If the number of messages is greater than the "Max messages queued" value, an alert is generated. You can customize this threshold as needed. Additionally, you can specify the instructions to be included in email notifications sent to recipients and in the alert message displayed in the Manage->Alerting->Alerts. It is important to note that if high bursts of messages occur regularly (e.g., during nightly batch processing, 1000 messages are expected to be produced to a certain queue), then setting a higher threshold (e.g., 1000 Max messages queued) can prevent false-positive alerts caused by more than 100 messages being queued during a duration of 10 minutes.
- Inactivity check
This trigger checks whether a particular queue receives at least one message regularly or within a specified duration that you can configure. With this trigger, you specify whether you want to 'always' have the check running everyday or only during a specified time range. Additionally, you can specify the instructions to be included in email notifications sent to recipients and in the alert message displayed in the Manage->Alerting->Alerts.- If you select the "Always" option, the next step is to configure the "Expect a message every" period. This is useful if you want to be notified when your queue has not received at least one message within a specified time frame, such as a day or more.
- If you select the "During time range" option, you can specify the days of the week and the starting time for the trigger to evaluate the queue. You will also need to specify the duration for which the trigger will evaluate and how frequently within that duration the queue should expect at least one message. Note that the "Expect a message every" setting must allow for at least two occurrences within the specified duration. If the queue receives a message before the end of the "Expect a message every" period, the timer will reset. This means that this trigger can produce two or more alerts a day.
- In the example above, the trigger is set to evaluate from Monday to Friday, 9:00 to 17:00, and expects a message every four hours, an alert will be sent if no message is received by 13:00. However, if a message is received at 11:00, then the timer resets, and the next check will be at 15:00. If no message is received by then, an alert will be sent. Consequently, due to the configuration of expects a message every four hours, and considering that there are only two hours left until the configured 17:00, the trigger for the remaining two hours will not be executed.
- Periodic activity check
This trigger checks whether at least the specified number of messages is received during the specified interval. Similar to the others, you can also specify the instructions to be included in email notifications sent to recipients and in the alert message displayed in Manage->Alerting->Alerts.- If you enable this trigger, you must also specify the days of the week, the starting time, and the duration for the trigger to evaluate the queue. Additionally, you need to specify the minimum number of messages the queue is expected to receive. If this number is not reached, an alert will be generated.
- Unlike the Inactivity check, this Periodic Activity check evaluates only at the end of each interval and does not reset the timer when the minimum number of messages is reached during the interval. This means that this trigger will not produce more than one alert per day.
- In the example above, the trigger is set to evaluate from Monday to Friday, from 9:00 to 8:45 in the following morning, and expects a minimum of 100 messages within each interval. If the 100 messages are not received by that 8:45 in the next morning, an alert will be sent. Alternatively, if the 100 messages are reached, no alert will be generated for that interval, and the next check will start again at 9:00. For intervals starting on Friday, the next check will begin at 9:00 AM on Monday, as Saturday and Sunday are not included.
Upon saving, these custom values will apply immediately, putting the new check into effect. Additionally, you will notice that the "Settings" status of the queue trigger you just customized has changed from "Default" to "Custom".
3.3 Customize Default Values
Next to customize the trigger conditions and thresholds for each queue, you can also modify the default values for all of your queue triggers. Changes to the default values will only apply to queue triggers that are set to use the default values, and not to those you have already customized. To modify the default values configured by eMagiz, you can click the "Configure defaults" button at the top of the queue trigger list.
Here, you will get a pop-up page quite resembling to the one when you customize the triggers for individual queues. The difference is that here you have the button to Reset the default values to the default values from eMagiz and the Save button is Update defaults, which will apply the default values that you configured to all queue triggers that are set to use the default values. Similar to customizing individual queue triggers, upon saving, the new default values will be put into effect immediately.
4. Key takeaways
- Queue alerting involves setting triggers for all queues in your model, which can be customized for individual queues or modified as default values.
- eMagiz provides four queue trigger options: Consumers Check (monitoring the number of processes consuming messages), Queue Load Check (monitoring the number of queued messages), Inactivity Check (ensuring regular received message), and Periodic Activity Check (ensuring a minimum number of messages within a specified interval).
- If you want to learn more on how to configure the recipients for the alerts generated from these queue triggers, please check out Setting up notification.
5. Suggested Additional Readings
If you are interested in this topic and want more information, please read the help text provided by eMagiz and read the following microlearning.