[ZBX-22160] notifications to MS Teams duplicated and action failed Created: 2023 Jan 04 Updated: 2024 Sep 18 Resolved: 2024 Sep 18 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Server (S) |
Affects Version/s: | 6.0.12, 6.2.6, 6.4.0beta5 |
Fix Version/s: | None |
Type: | Problem report | Priority: | Major |
Reporter: | Alessandro Lombardi | Assignee: | Aleksandr Iantsen |
Resolution: | Workaround proposed | Votes: | 3 |
Labels: | Microsoft, Teams, Webhook, media, notifications | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Attachments: |
![]() |
Team: |
Description |
Steps to reproduce:
Result: Action fail with error: Sending failed: {"version":"1.1","content":{"headers":[ {"key":"Content-Type","value":["text/plain; charset=utf-8"]}]},"statusCode":200,"reasonPhrase":"OK","headers":[],"trailingHeaders":[],"requestMessage":null,"isSuccessStatusCode":true}
Messages on MS Teams are posted but duplicated or triplicated. Issue started yesterday 3 January 2023, probably due to a change on MS Teams side
Expected: |
Comments |
Comment by Stefan Hölzle [ 2023 Jan 05 ] |
I uploaded a patch with a working solution: 0001-fix-response-handling.patch |
Comment by Alessandro Lombardi [ 2023 Jan 05 ] |
I have tried the patch but is failing too the error now is: Sending failed: TypeError: undefined not callable (property 'getStatus' of [object Object]) |
Comment by Stefan Hölzle [ 2023 Jan 05 ] |
Alessandro, |
Comment by Alessandro Lombardi [ 2023 Jan 05 ] |
Ah no sorry you were correct, my media template was not updated with the one you posted. Now it works Thanks!
|
Comment by Stefan Hölzle [ 2023 Jan 05 ] |
|
Comment by Marcel [ 2023 Jan 10 ] |
Can I safely use this if I have same issue on Zabbix server 5.4.12? |
Comment by Stefan Hölzle [ 2023 Jan 10 ] |
Well, maybe. As I said, the patch is based on the latest commit of the release/6.0 branch. I guess the easiest way to find out if my solution is working for you, would be to clone the "MS Teams" media type in your Zabbix installation. Then configure it send to another webhook and apply my patch. In order to test the new media type, you could set up an action that only sends events of some test trigger you can toggle. |
Comment by Christian Francis [ 2023 Jan 12 ] |
Could you tell me how I should use the patch?
Regards.
|
Comment by Marcel [ 2023 Jan 13 ] |
I exported my media type (5.4) as yaml, compare it with one used by Stefan (6.0) and there were only differences in "version name" so it was safe to change those few lines and it worked like a charm |
Comment by Christian Francis [ 2023 Jan 13 ] |
I now understand what the patching refers to, thank you. Regards. |
Comment by Aleksandr Iantsen [ 2024 Sep 18 ] |
lombardi.aless, thank you very much for this report and thanks everyone for your contribution. We appreciate your attention to the issue. Since Microsoft has announced retirement of Office 365 connectors within Microsoft Teams the current mediatype based on, we have developed MS Teams mediatype based on MS Teams Workflow and recommend to migrate to it. |