Wiki source code of Configure Alerting

Last modified by Erik Bakker on 2024/02/20 08:34

Show last authors
1 {{container}}
2 {{container layoutStyle="columns"}}(((
3
4 Assessing the health of your systems is critical in a stable and robust integration solution.
5 Getting alerts when something deviates is a crucial part of guaranteeing a stable and robust integration solution.
6
7 In this microlearning, we will educate you on Alerting within the Manage phase of eMagiz.
8
9 == 1. Prerequisites ==
10
11 * Basic knowledge of the eMagiz platform
12
13 == 2. Key concepts ==
14
15 This microlearning centers around setting up the alerting in eMagiz.
16 With alerting we mean: Configure thresholds that raise an alert when the threshold is passed
17
18 There are four areas on which you can configure alerting:
19
20 * Error Messages
21 * Log Entries
22 * Measurement Data
23 * Missing Data
24
25 Setting up the alerting in these four areas has common steps and specific steps
26
27 == 3. Alerting in eMagiz ==
28
29 Assessing the health of your systems is critical in a stable and robust integration solution.
30 Getting alerts when something deviates is a crucial part of guaranteeing a stable and robust integration solution.
31
32 First, we take a look at the general process of creating, updating, and deleting alerting in a general manner.
33 Afterward, we explain per area how you can configure the alerting correctly for that specific area.
34
35 To access the Alerting overview you navigate to Manage -> Alerting.
36
37 === 3.1 Best practices ===
38
39 * Use the standard as described here to correctly set up the alerting
40 * Always stay in contact with the business, preferable as early as possible on which triggers they deem relevant
41 * eMagiz already provides you, from the start point, with a set of relevant triggers
42 * Always send alerts to generic mailboxes or multiple persons. This to prevent problems when someone is unable to check their email.
43 * Use the include option. This means that you select all flows or runtimes for which a certain trigger is relevant. This prevents unnecessary triggers the moment you add an integration to Create. See the figure below for an example
44
45 [[image:Main.Images.Microlearning.WebHome@crashcourse-platform-manage-alerting-in-emagiz--include-option.png]]
46
47 * Always link a tag with a trigger. Tags can be re-used. Triggers need to be as specific as possible
48 * Always use a generic description for your trigger so it is clear to all what the function of the trigger is
49 * When naming the tags please consider this naming convention
50 * All standard tags are prefixed with Standard. Except for the Error messages and Cloud alert tag. Those are used by eMagiz for separate purposes
51 * All business tags are prefixed with Business
52 * Use the deployment plan to tell you which alerts you might need to update based on your Production deployment
53
54 [[image:Main.Images.Microlearning.WebHome@crashcourse-platform-manage-alerting-in-emagiz--deployment-plan-help.png]]
55
56 === 3.2 Create or Update alerting ===
57
58 1. Navigate to Manage -> Alerting -> Triggers
59 2. Check if there is already a trigger that determines a threshold for your use case
60 * If yes, double click on the alert in question and add the runtime, flow, statistic, etc. to the alert and press save. No need to continue any further.
61 * If no, continue with step 3
62 3. Navigate to Tags
63 4. Check if there is already a tag for your use case. See best practice on tag names for more information.
64 * If yes, then continue with step 5
65 * If no, create a new tag based on the best practice and continue with step 5
66 5. Navigate back to Triggers
67 6. Press the New button and determine the type of trigger
68 * If you want to raise alerts on **error messages** which you received from all queues that are running on your environment select the option Error Messages
69 * If you want to raise alerts on any type of **logging** that is generated on your environment select the option Log Entries
70 * If you want to raise alerts on all **statistics (runtime and queue)** that is generated on your environment select the option Measurement Data
71 * If you want to raise alerts on all **statistics (runtime and queue)** that is **not** generated on your environment select the option Missing Data
72
73 [[image:Main.Images.Microlearning.WebHome@crashcourse-platform-manage-alerting-in-emagiz--the-four-options.png]]
74
75 7. Link the tag to the trigger you have just created and enable the trigger
76
77 === 3.3 Trigger Error Messages ===
78
79 1. After you have selected the option Error messages as trigger type you will see the following pop up.
80
81 [[image:Main.Images.Microlearning.WebHome@crashcourse-platform-manage-alerting-in-emagiz--alert-error-messages-pop-up.png]]
82
83 2. For triggers on the error message you have three options as you can see from the above pop up:
84 * The exception class. If you want to use this trigger condition continue with step 3
85 * The exception message. If you want to use this trigger condition continue with step 6
86 * The header with name. If you want to use this trigger condition continue with step 9
87 3. Select the checkbox before the exception class. The screen will change to the following
88
89 [[image:Main.Images.Microlearning.WebHome@crashcourse-platform-manage-alerting-in-emagiz--alert-error-messages-pop-up-exception-class.png]]
90
91 4. Select if you want the exception class to be equal to, not equal to, contains, does not contain, matches, or does not match. The advice would be to make the alerting as specific as possible so choose: equal to, contains, or matches
92 5. Select the correct exception class for which the trigger needs to raise an alert. Examples are:
93 * org.springframework.integration.MessageRejectedException
94 * org.springframework.messaging.MessageHandlingException
95 * org.springframework.web.client.HttpClientErrorException
96 * com.emagiz.components.error.ErrorToXmlTransformer.RestErrorResponseBody
97 6. Select the checkbox before the exception message. The screen will change to the following
98
99 [[image:Main.Images.Microlearning.WebHome@crashcourse-platform-manage-alerting-in-emagiz--alert-error-messages-pop-up-exception-message.png]]
100
101 7. Select if you want the exception message to be equal to, not equal to, contains, does not contain, matches, or does not match. The advice would be to make the alerting as specific as possible so choose: equal to, contains, or matches
102 8. Select the correct exception message for which the trigger needs to raise an alert. Examples are:
103 * 400 Bad Request
104 * Message was rejected due to XML Validation errors
105 * failed to receive JMS response within timeout of
106 9. Select the checkbox before the header with name. The screen will change to the following
107
108 [[image:Main.Images.Microlearning.WebHome@crashcourse-platform-manage-alerting-in-emagiz--alert-error-messages-pop-up-header-with-name.png]]
109
110 10. Select if you want the name of the header to be equal to, not equal to, contains, does not contain, matches, or does not match. The advice would be to make the alerting as specific as possible so choose: equal to, contains, or matches
111 11. Select the correct name of the header for which the trigger needs to raise an alert. Examples are:
112 * xxx_sourceSystem
113 * xxx_targetSystems
114 * xxx_messageTypes
115 12. Select the correct value of the header for which the trigger needs to raise an alert. Examples are:
116 * Project
117 * Order
118 * WMS
119 * TMS
120
121 === 3.4 Trigger Log entries ===
122
123 1. After you have selected the option Log entries as trigger type you will see the following pop up
124
125 [[image:Main.Images.Microlearning.WebHome@crashcourse-platform-manage-alerting-in-emagiz--alert-log-entries-pop-up.png]]
126
127 2. Select which runtimes you will apply the trigger. For this also select the most specific option (advice is the following objects). Options are:
128 * The following objects
129 * All objects
130 * All objects, except for
131 3. Select which trigger condition you want the alert to be raised. Options are:
132 * The level. If you want to use this continue with step 4
133 * The bundle. Don’t use this option. It has no practical use
134 * The flow. Don’t use this option. The trigger would be too specific but yet at the same time too generic.
135 * The message. If you want to use this continue with step 5
136 * The stack trace. If you want to use this continue with step
137 4. Log entries can be sent in three forms i.e. Info, Warning, or Error. The Error option is the most relevant one to select as other forms are only relevant in combination with other triggers conditions
138 5. Select if you want the message to be equal to, not equal to, contains, does not contain, matches, or does not match. The advice would be to make the alerting as specific as possible so choose: equal to, contains, or matches
139 6. Select the correct exception message for which the trigger needs to raise an alert. Examples are:
140 * org.springframework.transaction.CannotCreateTransactionException
141 * Application exception overridden by rollback exception
142 7. Select if you want the stack trace to be equal to, not equal to, contains, does not contain, matches, or does not match. The advice would be to make the alerting as specific as possible but due to the nature of stack traces we advise using the contains function on a specific section relevant to that flow.
143 8. Select the correct part of the stack trace for which the trigger needs to raise an alert. Examples are:
144 * org.springframework.messaging.MessageHandlingException: error occurred in message handler
145 * AMQ224095: Error updating Consumer Count
146
147 === 3.5 Trigger measurement data ===
148
149 1. Select which evaluated object type you want to start your trigger with. Two options are predominantly used:
150 * Runtime. If you want to select this option continue with step 2
151 * JMS queue. If you want to select the JMS queue continue with step 5
152
153 [[image:Main.Images.Microlearning.WebHome@crashcourse-platform-manage-alerting-in-emagiz--alert-measurement-data-choice.png]]
154
155 2. You will be prompted with the following pop-up. The first step is to select the Runtimes for which the trigger will be executed. Once again the advice is to use the following objects option
156
157 [[image:Main.Images.Microlearning.WebHome@crashcourse-platform-manage-alerting-in-emagiz--alert-measurement-data-runtimes-pop-up.png]]
158
159 3. Next step would be to select the Trigger condition on which you want the trigger to raise an error. For each option, you have furthermore the option to select is greater than or is less than.
160 4. Use the runtime statistics of the runtime(s) for which you want to configure the trigger to determine the correct thresholds.
161 5. You will be prompted with the following pop-up. The first step is to select the JMS queues for which the trigger will be executed. Once again the advice is to use the following objects option
162
163 [[image:Main.Images.Microlearning.WebHome@crashcourse-platform-manage-alerting-in-emagiz--alert-measurement-data-jms-queue-pop-up.png]]
164
165 6. Next step would be to select the Trigger condition on which you want the trigger to raise an error. For each option, you have furthermore the option to select is greater than or is less than.
166 7. Mainly the two following options are used in all busses (and are supplied standard by eMagiz):
167 * One for queued messages
168 * One for the number of consumers
169 8. Use the queue statistics of the JMS queue(s) for which you want to configure the trigger to determine the correct thresholds (in combination with common sense)
170
171 === 3.6 Trigger missing data ===
172
173 1. Select which evaluated object type you want to start your trigger with. Two options are predominantly used:
174 * Runtime. If you want to select this option continue with step 2
175 * JMS queue. If you want to select the JMS queue continue with step 6
176
177 [[image:Main.Images.Microlearning.WebHome@crashcourse-platform-manage-alerting-in-emagiz--alert-missing-data-choice.png]]
178
179 2. You will be prompted with the following pop-up. The first step is to select the Runtimes for which the trigger will be executed. Once again the advice is to use the following objects option
180
181 [[image:Main.Images.Microlearning.WebHome@crashcourse-platform-manage-alerting-in-emagiz--alert-missing-data-runtimes-pop-up.png]]
182
183 3. The two following options are used in all busses (and are supplied standard by eMagiz):
184 * One for data measurements
185 * One for log entries
186 4. If you feel you need to change and/or add/adapt triggers of this kind please take a look at those eMagiz generated for you. Those are generated based on the best practice
187 5. You will be prompted with the following pop-up. The first step is to select the Runtimes for which the trigger will be executed. Once again the advice is to use the following objects option
188
189 [[image:Main.Images.Microlearning.WebHome@crashcourse-platform-manage-alerting-in-emagiz--alert-missing-data-jms-queue-pop-up.png]]
190
191 6. For trigger conditions you have the following options:
192 * Data measurements. Loss of data measurements is already covered on runtime level, with the queued messages and number of consumers trigger. Therefore this is not needed unless you have a specific scenario.
193 * Messages. In some cases, it can be handy if you receive an alert when messages are missing over a certain period. For example when you have an integration that is always running, each day, between 19:00 and 20:00 and needs to deliver data. If not someone needs to know. Continue with step 8 in which we elaborate on this example further.
194 7. Select messages for Trigger when the following option: messages
195 8. Select for are missing over the last the following option: 15 minutes
196 9. Check continuously on yes
197 10. Evaluate only on: Select all days (default option)
198 Between: 19:00 and 20:00. Be aware eMagiz talks UTC so take that into account when selecting the correct values.
199
200 == 4. Key takeaways ==
201
202 There are four areas on which you can configure alerting:
203
204 * Error Messages
205 * Log Entries
206 * Measurement Data
207 * Missing Data
208
209 Setting up the alerting in these four areas has common steps and specific steps
210
211 == 5. Suggested Additional Readings ==
212
213 If you are interested in this topic and want more information on it please read the help text provided by eMagiz.
214 )))((({{toc/}}))){{/container}}
215 {{/container}}