[ZBX-18680] Slack media type incorrect behavoir with 2 or more channels Created: 2020 Nov 19  Updated: 2024 Apr 10  Resolved: 2021 Sep 05

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Templates (T)
Affects Version/s: 5.2.1
Fix Version/s: 5.0.16rc1, 5.4.5rc1, 6.0.0alpha2, 6.0 (plan)

Type: Problem report Priority: Trivial
Reporter: Daniil Makeev Assignee: Andrew Biba
Resolution: Fixed Votes: 3
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Zabbix 5.2.1 on CentOS 8.2 (Virtual server).
Zabbix Slack media type (Native).


Attachments: PNG File image-2020-11-20-01-16-31-180.png     PNG File image-2020-11-20-01-16-44-125.png     PNG File image-2020-11-20-01-17-27-436.png    
Issue Links:
Causes
Team: Team INT
Sprint: Sprint 78 (Jul 2021), Sprint 79 (Aug 2021), Sprint 80 (Sep 2021)
Story Points: 1

 Description   

Normal behavior:

  1. Setup Slack webhook with "alarm" type (https://www.zabbix.com/ru/integrations/slack)
  2. Add contact with Slack channel #channel (private)
  3. Receive ALARM message to #channel
  4. Receive UPDATE under message thread
  5. Receive RECOVERY by changing the original message title and color

 

But if we want to use 2 or more Slack channels/contact the behavior is incorrect:

  • UPDATE messages locate just in Slack channel, not under the message thread
  • RECOVERY events are sent (Zabbix logs are ok), but they don't reach Slack channels

Steps to reproduce:

  1. Setup Slack webhook with "alarm" type (https://www.zabbix.com/ru/integrations/slack)
  2. Add contact1 with Slack channel #channel1 (private)
  3. Add contact2 with Slack channel #channel2 (private)
  4. Simulate the problem
  5. We receive ALARM message in both Slack channels (#channel1 and #channel2)
  1. Simulate the recovery or update message
  2. No RECOVERY message

Result:

1. ALARM message (same in #channel1 and #channel2)

2. UPDATE message (same in #channel1 and #channel2)

3. No RECOVERY message received in Slack channels!

4. Under tags section in problem list we see

2 channel ids, 2 channel names, 2 message links and 2 message timestamps.

 

Disabling all other Slack contacts except 1 solves the problem.

Expected:
We expect that sending notifications in 2 or more Slack channels should work like in case of 1 Slack channel.



 Comments   
Comment by Alex [ 2020 Nov 24 ]

Running into the same issue. Any solutions?

I have tried: 

1. Using the same media type, with the same bot token for both contact types

Both updates fail with slack API error: message_not_found

2. Using two different media types, with the same Slack bot token

Slack updates one alert, but returns API error: message_not_found for the other..

3. Using two different media types, with two different  Slack bot tokens

Slack updates one alert, but returns API error: cant_update_message for the second

Unsure if this is a zabbix script limitation, or a Slack API limitation at this point.. The cant_update_message response in my third test seems to indicate zabbix might be trying to use one mediatype/bot token to create the message, and the other to update..

Comment by Daniil Makeev [ 2020 Dec 06 ]

Oleksii Zagorskyi, any solutions?

Comment by Andrew Biba [ 2021 Sep 02 ]

Available in:

Generated at Fri Apr 25 07:45:21 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.