[ZBX-20392] Opsgenie intergration is broken for problem closing Created: 2021 Dec 25  Updated: 2024 Apr 10  Resolved: 2022 Oct 06

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Server (S)
Affects Version/s: 5.0.19
Fix Version/s: 5.0.29rc1, 6.0.10rc1, 6.2.4rc1, 6.4.0beta2, 6.4 (plan)

Type: Problem report Priority: Major
Reporter: Anastasiya Assignee: Andrey Tocko (Inactive)
Resolution: Fixed Votes: 10
Labels: integration, mediatypes, opsgenie
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File image-2021-12-25-18-34-02-877.png     PNG File opsgenie_1.png     PNG File opsgenie_2.png     PNG File opsgenie_3.png    
Issue Links:
Sub-task
depends on ZBX-21563 Recovery operation executes before up... Closed
part of ZBXNEXT-6525 Allow OpsGenie WebHook mediatype to c... Open
Team: Team INT
Sprint: Sprint 91 (Aug 2022), Sprint 92 (Sep 2022), Sprint 93 (Oct 2022)
Story Points: 1

 Description   

Steps to reproduce:

  1. Use in-box opsgenie integration from https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/media/opsgenie/media_opsgenie.xml?at=refs%2Fheads%2Frelease%2F5.0
  2. Make the config for opsgenie target
  3. Make a problem - we see, the problem is registrated  by opsgenie
  4. Close the problem - problem status in opsgenie updates but he problem stays open

Result:

Problem status in opsgenie updates but he problem stays open

Expected:
Problem in opsgenie becomes closed

 

___
It is wokring as expected on 4.4

I've investigate the subj the problem seems to be in post data

For a opening api-method is correct for opsgenie

For a closing it has to be different: https://docs.opsgenie.com/docs/alert-api#close-alert

But it Javascript code it is the same for both methods, thats why webhook script prefer to update alert not close it even the event_value param is 0

 



 Comments   
Comment by Francys Nivea (Inactive) [ 2021 Dec 28 ]

Hello Anastasiya,
Thank you for contacting us.
To better analyze your problem, please send us the version of OpsGenie you are using and your media type settings, in addition to the configured script.
Thank you

Comment by Anastasiya [ 2021 Dec 29 ]

Hello!

Thank you for report.

I dont know exactly how to get opsgenie version. It's the one which the site https://www.atlassian.com/ru/software/opsgenie shows 

As for media settings - screenshots in attach

Also I fixed it for me with code https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/media/opsgenie/media_opsgenie.xml?at=refs%2Fheads%2Frelease%2F5.0#367

if (params.event_value == 1)

{ resp = Media.request('post', '', fields); }

else

{ resp = Media.request('post', params.event_id +'/close?identifierType=alias', fields); }

But I don't know exactly if it is correct enough 

Comment by Anastasiya [ 2021 Dec 29 ]

i think my issue is close enough to https://support.zabbix.com/browse/ZBXNEXT-6525?jql=text%20~%20%22opsgenie%22

Comment by Olexandr [ 2022 Aug 16 ]

Hello, dear Zabbix team, please advice - is it possible for this issue to be fixed Out of the Box by Zabbix team?

Comment by Andrey Tocko (Inactive) [ 2022 Oct 04 ]

Fixed in

Generated at Fri May 02 10:44:42 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.