-
Type:
Incident report
-
Resolution: Unresolved
-
Priority:
Trivial
-
None
-
Affects Version/s: 7.4.15
-
Component/s: Templates (T)
-
Environment:Zabbix server 7.4.15, media type "Rocket.Chat" (webhook, shipped version), two Rocket.Chat recipients per action.
Steps to reproduce:
- Configuration: media type "Rocket.Chat". Two users with Rocket.Chat media and different sendto values, e.g. "@user1" and "@user2".
- Trigger action that sends a message to both users, with recovery operation "Notify all involved".
- Trigger a problem and let it recover.
- Check the event tags of the problem event and the recovery message in both rooms.
Result:
Both PROBLEM messages arrive in their own room. Both RESOLVED messages arrive in the room of one recipient only (the other room never gets a recovery message). Zabbix reports both alerts as sent (alert status 1, no error).
The problem event carries duplicate tags, the same tag names once per recipient:
__zbx_rc_id = <message id of recipient 1> __zbx_rc_rid = <room id of recipient 1> __zbx_rc_id = <message id of recipient 2> __zbx_rc_rid = <room id of recipient 2>
The media type reads the tags for the thread reply through these parameters, so both recovery alerts resolve to the same tag pair:
rc_msg_id = {EVENT.TAGS.__zbx_rc_id}
rc_room_id = {EVENT.TAGS.__zbx_rc_rid}
Expected:
Each recipient gets the RESOLVED message as a reply in the thread of their own PROBLEM message.
The Telegram media type already handles this by putting the recipient into the tag name and reading the tags through a parameter with all event tags:
tag: __telegram_msg_id_<chat_id>
parameter: event_tags = {EVENT.TAGSJSON}
The Rocket.Chat media type can do the same:
tags: __zbx_rc_id_<sendto>, __zbx_rc_rid_<sendto>, __zbx_rc_msg_url_<sendto>
parameter: event_tags = {EVENT.TAGSJSON}
and look up the tags of the current rc_send_to in the script instead of using the fixed rc_msg_id / rc_room_id parameters.
I tested this change locally in 7.4.15 with two different recipients: each RESOLVED message is posted in the thread of its own PROBLEM message, and the event carries separate tags per recipient. The event menu URL of the media type also references the fixed tag name and would need a matching change. Other chat media types with fixed tag names may be affected as well.