Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

When the alarm is resolved in Zabbix, the opsgeni does not turn off the alarm.

okan.gun October 21, 2022

I added zabbix to Opsgenie.
I can see alarms in Opsgenie.
When the alarm is resolved in Zabbix, the opsgeni does not turn off the alarm.
/var/log/opsgenie/send2opsgenie.log
ERROR apiUrl: https://api.opsgenie.com/v1/json/zabbix
WARNING final proxy 0x64efe0

I am getting the above error.

/home/opsgenie/oec/scripts/actionExecutor.py
alert_api_url = args['opsgenieUrl'] + "/v1/alerts/" + alert_id
I updated the above line to "/v2/alerts/".
on send2opsgenie.go*
apiUrl := configParameters["opsgenie.api.url"] + "/v1/json/zabbix"
I updated the above line to "/v2/json/zabbix".
Despite these
ERROR apiUrl: https://api.opsgenie.com/v1/json/zabbix
I get this error.
send2opsgenie* I could not open this file.
Could that be the problem?
I would appreciate your help

1 answer

0 votes
Andrew Laden
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 21, 2022

Since your triggers from zabbix are creating opsgenie alerts, I doubt the problem is in your script.

One thing to be aware of is that there are two completely different ways to integrate zabbix and opsgenie. The old way using OEC, and the new way using the built in zabbix webhook integration. You should make sure which one you are using.

The webhook: 

The OEC based

If you are using send2opsgenie.log, then you are likely using the OEC based one, but you should make sure you aren't trying to use both. Which ever one you configure, make sure you do it completely.

I use the OEC based version, as it predates the webhook, and I have some extra functionality in it.

okan.gun October 23, 2022

Hello Andrew,

Thanks for your comment.
When I added it with the webhook, the alarms came to opsgenie 10 minutes later.
So I did it using OEC.
https://github.com/opsgenie/opsgenie-integration/issues/25
In the link above, api/v1 will be deprecated.
I may be having problems because of this.
I couldn't open the send2opsgenie file.
Is there a way to open this file?
I opened and edited the send2opsgeni.go file.
I think I need to fix the log below.
ERROR apiUrl: https://api.opsgenie.com/v1/json/zabbix
but I looked at all the files. Except this send2opsgenie file.
I haven't seen anyone with V1.
Can you help me open the send2opsgenie file?
Thanks in advance for your help

 

Thank you

Andrew Laden
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 24, 2022

the .go file is source code. It needs to be compiled to create the send2opsgenie binary.

That said, you should not need to modify it. In that post you referenced it says

@SvenVD our integration endpoints will remain the same. We will only deprecate our RESTful API v1 which has endpoints like /v1/json/alerts, /v1/json/schedules, etc. Our integration endpoints like /v1/json/zabbix, /v1/json/servicenow will still be functioning the same. But thank you for your concern!

So you don't need to change that line, and don't need to update the send2opsgenie file.

If your zabbix alert is creating an opsgenie alert, then the send2opsgenie file is working, as the same file is used for all actions.

I would check your setup again and make sure you have the actions specified correctly for close, not just for open. 

Like okan.gun likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events