[ZBXCTR-10] iLert integration in Zabbix Created: 2020 Jun 29 Updated: 2024 Apr 10 Resolved: 2020 Sep 01 |
|
Status: | Closed |
Project: | ZABBIX CONTRIBUTION |
Component/s: | Template |
Affects Version/s: | None |
Fix Version/s: | 5.0.4rc1, 5.2.0alpha2, 5.2 (plan) |
Type: | New Feature | Priority: | Trivial |
Reporter: | Aleksandrs Larionovs (Inactive) | Assignee: | Aleksandrs Larionovs (Inactive) |
Resolution: | Fixed | Votes: | 0 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Attachments: |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Team: | |
Sprint: | Sprint 65 (Jun 2020), Sprint 67 (Aug 2020) |
Story Points: | 1 |
Description |
iLert integration in Zabbix |
Comments |
Comment by Vjaceslavs Bogdanovs [ 2020 Jul 08 ] |
(1) README is broken: |
Comment by Vjaceslavs Bogdanovs [ 2020 Jul 08 ] |
(2) Is having 10 retries with 30s interval justified? |
Comment by Vjaceslavs Bogdanovs [ 2020 Jul 08 ] |
(3) The following check: if (typeof alertSourceKey === 'string' && alertSourceKey.trim() === '') { Should be fixed as follows: if (typeof alertSourceKey !== 'string' || alertSourceKey.trim() === '') { Both non-string values and empty string values should cause an error. <natalja.zabbix> This is still not fixed. |
Comment by Vjaceslavs Bogdanovs [ 2020 Jul 08 ] |
(4) First check is not required here: if (!!resp && typeof resp === 'object' && typeof resp.message === 'string') { It could be just: if (typeof resp === 'object' && typeof resp.message === 'string') { with the same result. |
Comment by Vjaceslavs Bogdanovs [ 2020 Jul 09 ] |
(5) It is unclear why 404 and other codes are considered valid results according to the code: if (req.Status() != 429 && req.Status() >= 400 && req.Status() <= 499) { return JSON.stringify(result); } Are you sure that this is ok? |
Comment by Aleksandrs Larionovs (Inactive) [ 2020 Jul 09 ] |
Hello roman-ilert, |
Comment by Roman Rogozhnikov [ 2020 Jul 09 ] |
alarionovs vjaceslavs Thank you for the code review. I made some changes based on your comments:
|
Comment by Vjaceslavs Bogdanovs [ 2020 Jul 10 ] |
roman-ilert, thank you for your response. I still have a few questions/suggestions:
|
Comment by Roman Rogozhnikov [ 2020 Jul 10 ] |
vjaceslavs, thanks for your suggestions. We have once again discussed the suggestions in the team and decided to follow your advice. Specifically: |
Comment by Natalja Romancaka [ 2020 Jul 15 ] |
(6) iLert incident link is not generated on trigger event
Result: there is no link to iLert <natalja.zabbix> TESTED |
Comment by Natalja Romancaka [ 2020 Jul 15 ] |
(7) Zabbix link in ilert is set to the item Graph /history.php?action=showgraph&itemids[]={ITEM.ID} It is better to add link on event details page. There is more information about incident /tr_events.php?triggerid={TRIGGER.ID}&eventid={EVENT.ID}. |
Comment by Natalja Romancaka [ 2020 Jul 15 ] |
(8) Event update in zabbix doesn't work properly with iLert. It is possible to receive notification only when set Acknowledge in problem.
1. For other problem update actions (comment and change severity) - error "iLert notification failed : TypeError: cannot read property 'incidentUrl' of null".
2. For problem that has already acknowledgment- error is "iLert notification failed : Cannot accept an incident that is already in ACCEPTED status"
3. When problem has resolved and updating the event get error "iLert notification failed : no open incident found with key zabbix-xxx"
|
Comment by Natalja Romancaka [ 2020 Jul 15 ] |
(9) iLert webhook not support non-trigger event types |
Comment by Natalja Romancaka [ 2020 Jul 15 ] |
(10) What means " = 1" near trigger id in incident details <natalja.zabbix> TESTED |
Comment by Natalja Romancaka [ 2020 Jul 15 ] |
(11) Timeline contains "null" event when acknowledge problem in zabbix <natalja.zabbix> TESTED |
Comment by Natalja Romancaka [ 2020 Jul 15 ] |
(12) It is not clear where the problem is when use test option to check media type
Result: Error message "iLert notification failed : TypeError: cannot read property 'incidentUrl' of null" |
Comment by Vjaceslavs Bogdanovs [ 2020 Jul 24 ] |
roman-ilert, we are waiting for your actions after the QA session. |
Comment by Roman Rogozhnikov [ 2020 Jul 28 ] |
natalja.zabbix vjaceslavs thank you for the review. We have made corresponding changes and waiting for the second review.
|
Comment by Vjaceslavs Bogdanovs [ 2020 Jul 30 ] |
roman-ilert, as for the #9 we do ask for webhooks to support non-trigger event types. It is more convenient for the end-users to have webhooks that cover all of the use cases. If you still think that non-trigger events are not applicable for your webhook I would ask to explicitly state this in the README.md file. As for the #7, the common approach is to give a link to an event detail page. This is the way how it is done in other Webhooks. So our recommendation is to stick to this format. |
Comment by Roman Rogozhnikov [ 2020 Jul 30 ] |
vjaceslavs, I'm not sure what you're talking about in #9. What exactly these events are? Comments? Priority changes? Events relation? Anyway, our goal was to make the first version with all basic functionality that we already have. We plan to add more features later and this requires changes only from our side.
As I mentioned earlier for the #7, we've already fixed the "event detail link" problem: and we're also adding additional links for Zabbix charts:
|
Comment by Vjaceslavs Bogdanovs [ 2020 Jul 30 ] |
roman-ilert thank you for the clarification. Non-trigger events are internal events (not supported items, autoregistration events, etc). But they could be added later. |
Comment by Natalja Romancaka [ 2020 Aug 06 ] |
(13) Test option to check media type always return success message, but no incident is created in iLert system. There must be parameters validation to create test incident in iLert. |
Comment by Natalja Romancaka [ 2020 Aug 06 ] |
(14) It would be great if there was an error for not supported events for iLert in Reports ->Action log, such as:
Because this events not affect on incident (no incidents updates or new creation) in iLert. |
Comment by Natalja Romancaka [ 2020 Aug 06 ] |
(15) Please update README file
|
Comment by Roman Rogozhnikov [ 2020 Aug 10 ] |
(13) We fixed this, so you can try it out.
(14) We never log an incident action if an event was ignored, so when we add support for the non-trigger events, then the action logs will appear. As I mentioned earlier will plan to do that in the future.
(15) We added a note about support for trigger events only. However, we believe that alert source api key that generated in iLert should not be in media parameter .ILERT.ALERT.SOURCE.KEY, but in the user's "Send to" field und the .ILERT.ALERT.SOURCE.KEY parameter should filled by default with {ALERT.SENDTO}, which is a value of the user's "Send to" field. We believe that this approach will allow users to use Zabbix more effectively with multiple alert sources. This means that the user must perform the full Zabbix <=> iLert configuration (Zabbix: media type, user group, permissions, user, action. iLert: alert source) only the first time. The next time the user only has to create a new alert source in iLert and a new user in Zabbix. Otherwise, the user will have to create all resources again (Zabbix: media type, user group, permissions, user, action. iLert: alert source). |
Comment by Natalja Romancaka [ 2020 Aug 12 ] |
(16) Looks like happen misunderstanding about media type "Test" option. For example, for webhook PagerDuty need to change 6 parameters to create an incident in the system. |
Comment by Natalja Romancaka [ 2020 Aug 12 ] |
(17) How many item graph url can be in the iLert incident view? |
Comment by Roman Rogozhnikov [ 2020 Aug 17 ] |
(16) fixed (17) fixed |
Comment by Natalja Romancaka [ 2020 Aug 18 ] |
(18) Parameters validation
Result: no incident created (response is null)
|
Comment by Roman Rogozhnikov [ 2020 Aug 18 ] |
(18) fixed |
Comment by Natalja Romancaka [ 2020 Aug 19 ] |
(19) There are still cases where the response received during webhook test is null. Please add checks and corresponding error message for fields: EVENT.ACK.STATUS (Yeas or No), EVENT.UPDATE.STATUS (0 - Webhook was called because of problem/recovery event, 1 - Update operation.) , EVENT.VALUE (1 for problem, 0 for recovering) 1. Steps to reproduce:
Result: During webhook test macros are unresolved, so it just string value. But incident is not created with random text in all parameters. Media type test failed. - Sending failed: incorrect value for variable "EVENT.ACK.STATUS". The value must be Yes or No. Media type test failed. - Sending failed: Incorrect "EVENT.UPDATE.STATUS" parameter given: "{EVENT.UPDATE.STATUS}". - Must be 0 or 1. 2. Steps to reproduce:
Expected result: error message instead of successful test 3. Steps to reproduce:
Expected result: error message instead of successful test |
Comment by Roman Rogozhnikov [ 2020 Aug 20 ] |
(19) 1. Fixed 2. and 3. this is an expected behaviour, as the iLert incident can't be reopened by design, we avoid such API errors to prevent UI errors in the Zabbix trigger view (Actions Log), which might confuse the user. We already discussed and fixed this issue in (8) - 3. |
Comment by Natalja Romancaka [ 2020 Aug 21 ] |
(20) please fix this line in README file "The text from "Action Recovery Operations" and "Action Update Operations" will be sent to "iLert Alert Notes" when a problem is resolved or updated". There is no text from recovery and update operations. Only appears "Note" that accept (for acknowledgement) or resolved event has been received and changed incident status. |
Comment by Roman Rogozhnikov [ 2020 Aug 21 ] |
(19) README fixed |
Comment by Vjaceslavs Bogdanovs [ 2020 Aug 26 ] |
Available in:
Documentation updated:
|