Hello,
I am in need of help on a Python script that I unfortunately am not a Python expert at all. The issue is, currently we are successfully able to send an event coming from JSM to JEC and see it in the corresponding Webex Team Space, but, in the Alert Rules, if we have multiple teams in the Responders field, it only send the event to one of the teams and not both.
I believe this is where the script is looking for the team names:
if queue_message["action"] == "Create":
markdownPrefix = "**NEW " +alertPriority +" Alert:** "
if "team" in queue_message["alert"]:
alertTeam = queue_message["alert"]["team"]
else:
alertTeam = "unassigned"
I have no idea how to modify the Python script so it will look at both teams.
Here is the actual event, where I can see the "team" field, only showing one of the 2 teams. But, I do see another "team" field within "type" that is showing both of the teams.
"alert":{"alertId":"124940e9-b533-4dd0-9e79-873359e777b5-1779466299779","id":"124940e9-b533-4dd0-9e79-873359e777b5-1779466299779","type":"alert","message":"TEST Alert","tags":[],"tinyId":"278357","entity":"","alias":"1056bed8-6256-4dfa-8ca1-9aeedbd675e7","createdAt":1779466299779,"updatedAt":1779466300640000000,"username":"TEST","team":"Monitoring_Admin","responders":[{"id":"f8c9079d-c7bb-4e58-ac83-359cb217a3b5","type":"team","name":"Monitoring_Admin"},{"id":"4a16a8bb-2e50-4fb2-8885-173bc7ea7384","type":"team","name":"OEC_Monitoring"}],"teams":["f8c9079d-c7bb-4e58-ac83-359cb217a3b5","4a16a8bb-2e50-4fb2-8885-173bc7ea7384"],"actions":[],"priority":"P3","source":"TEST"}
Any help on this one would make my year, really appreciate it in advance.
Just let me know if more details are needed.
Thanks,
Tom