New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Alert notifications to OpsGenie WebAPI #6687

Closed
StianOvrevage opened this Issue Nov 24, 2016 · 10 comments

Comments

Projects
None yet
10 participants
@StianOvrevage

StianOvrevage commented Nov 24, 2016

Would much appreciate the possibility of sending alert notifications to OpsGenie (a service similar to but much cheaper than PagerDuty).

@nhproject

This comment has been minimized.

Show comment
Hide comment
@nhproject

nhproject Dec 4, 2016

Hi guys,

Amazing work on the new version!!
Any insight when the OpsGenie notifications integration will be available?

Keep up your phenomenal work!

Nitz

nhproject commented Dec 4, 2016

Hi guys,

Amazing work on the new version!!
Any insight when the OpsGenie notifications integration will be available?

Keep up your phenomenal work!

Nitz

@bergquist

This comment has been minimized.

Show comment
Hide comment
@bergquist

bergquist Dec 7, 2016

Contributor

Closed by #6856

Contributor

bergquist commented Dec 7, 2016

Closed by #6856

@Duologic

This comment has been minimized.

Show comment
Hide comment
@Duologic

Duologic Feb 20, 2017

I was testing the OpsGenie integration on 4.1.2 but it doesn't seem to work:

Feb 20 21:06:44 log1.mv.redbee.nl grafana-server[1294]: 
t=2017-02-20T21:06:44+0100
lvl=eror 
msg="Failed to send notification to OpsGenie" 
logger=alerting.notifier.opsgenie 
error="Webhook response status 401 Unauthorized" 
body="{\"alias\":\"alertId-0\",\"apiKey\":\"[removed]\",\"description\":\"Test notification - http://grafana.internal/\\nSomeone is testing the alert notification within grafana.\",\"details\":{\"image\":\"http://grafana.org/assets/img/blog/mixed_styles.png\",\"url\":\"http://grafana.internal/\"},\"message\":\"Test notification\",\"source\":\"Grafana\"}"

Any chance this is a bug? :)

Duologic commented Feb 20, 2017

I was testing the OpsGenie integration on 4.1.2 but it doesn't seem to work:

Feb 20 21:06:44 log1.mv.redbee.nl grafana-server[1294]: 
t=2017-02-20T21:06:44+0100
lvl=eror 
msg="Failed to send notification to OpsGenie" 
logger=alerting.notifier.opsgenie 
error="Webhook response status 401 Unauthorized" 
body="{\"alias\":\"alertId-0\",\"apiKey\":\"[removed]\",\"description\":\"Test notification - http://grafana.internal/\\nSomeone is testing the alert notification within grafana.\",\"details\":{\"image\":\"http://grafana.org/assets/img/blog/mixed_styles.png\",\"url\":\"http://grafana.internal/\"},\"message\":\"Test notification\",\"source\":\"Grafana\"}"

Any chance this is a bug? :)

@dugeem

This comment has been minimized.

Show comment
Hide comment
@dugeem

dugeem Mar 17, 2017

Grafana 4.1.1 - OpsGenie integration is not working:

t=2017-03-15T09:06:15+1100
lvl=eror
msg="Failed to send notification to OpsGenie"
logger=alerting.notifier.opsgenie
error="Webhook response status 401 Unauthorized"
body="{"alias":"alertId-0","apiKey":"https://api.opsgenie.com/v1/json/grafana?apiKey=removed\",\"description\":\"Test notification - http://fqdn.removed:80/\\nSomeone is testing the alert notification within grafana.","details":{"image":"http://grafana.org/assets/img/blog/mixed_styles.png\",\"url\":\"http://
fqdn.removed:80/"},"message":"Test notification","source":"Grafana"}"

We were successfully able to push alerts to OpsGenie by using Alert type Webhook instead.

dugeem commented Mar 17, 2017

Grafana 4.1.1 - OpsGenie integration is not working:

t=2017-03-15T09:06:15+1100
lvl=eror
msg="Failed to send notification to OpsGenie"
logger=alerting.notifier.opsgenie
error="Webhook response status 401 Unauthorized"
body="{"alias":"alertId-0","apiKey":"https://api.opsgenie.com/v1/json/grafana?apiKey=removed\",\"description\":\"Test notification - http://fqdn.removed:80/\\nSomeone is testing the alert notification within grafana.","details":{"image":"http://grafana.org/assets/img/blog/mixed_styles.png\",\"url\":\"http://
fqdn.removed:80/"},"message":"Test notification","source":"Grafana"}"

We were successfully able to push alerts to OpsGenie by using Alert type Webhook instead.

@DanCech

This comment has been minimized.

Show comment
Hide comment
@DanCech

DanCech Mar 17, 2017

Member

@dugeem your log output appears to indicate that your config is incorrect, the apiKey should just be a string like "eb243592-faa2-4ba2-a551q-1afdf565c889" not a url like "https://api.opsgenie.com/v1/json/grafana?apiKey=eb243592-faa2-4ba2-a551q-1afdf565c889"

Member

DanCech commented Mar 17, 2017

@dugeem your log output appears to indicate that your config is incorrect, the apiKey should just be a string like "eb243592-faa2-4ba2-a551q-1afdf565c889" not a url like "https://api.opsgenie.com/v1/json/grafana?apiKey=eb243592-faa2-4ba2-a551q-1afdf565c889"

@kshcherban

This comment has been minimized.

Show comment
Hide comment
@kshcherban

kshcherban Sep 8, 2017

Have the same issue that OpsGenie integration throws 401

Sep  8 16:56:28 localhost docker/grafana[643]: t=2017-09-08T14:56:28+0000
lvl=eror msg="Failed to send notification to OpsGenie" 
logger=alerting.notifier.opsgenie error="Webhook response status 401 Unauthorized" body="{\"alias\":\"alertId-0\",\"apiKey\":\"some-api-key-secret-id\",
\"description\":\"Test notification - https://grafana.prod.example.com/\\nSomeone is testing the alert notification within grafana.\",
\"details\":{\"image\":\"http://grafana.org/assets/img/blog/mixed_styles.png\",
\"url\":\"https://grafana.prod.example.com/\"},\"message\":\"Test notification\",\"source\":\"Grafana\"}"

kshcherban commented Sep 8, 2017

Have the same issue that OpsGenie integration throws 401

Sep  8 16:56:28 localhost docker/grafana[643]: t=2017-09-08T14:56:28+0000
lvl=eror msg="Failed to send notification to OpsGenie" 
logger=alerting.notifier.opsgenie error="Webhook response status 401 Unauthorized" body="{\"alias\":\"alertId-0\",\"apiKey\":\"some-api-key-secret-id\",
\"description\":\"Test notification - https://grafana.prod.example.com/\\nSomeone is testing the alert notification within grafana.\",
\"details\":{\"image\":\"http://grafana.org/assets/img/blog/mixed_styles.png\",
\"url\":\"https://grafana.prod.example.com/\"},\"message\":\"Test notification\",\"source\":\"Grafana\"}"
@daniellee

This comment has been minimized.

Show comment
Hide comment
@daniellee

daniellee Sep 13, 2017

Member

@kshcherban are you sure your API Key is correct?

Member

daniellee commented Sep 13, 2017

@kshcherban are you sure your API Key is correct?

@kshcherban

This comment has been minimized.

Show comment
Hide comment
@kshcherban

kshcherban Sep 13, 2017

@daniellee yes, key was correct.

kshcherban commented Sep 13, 2017

@daniellee yes, key was correct.

@cglrkn

This comment has been minimized.

Show comment
Hide comment
@cglrkn

cglrkn Sep 15, 2017

Contributor

@kshcherban OpsGenie has 2 different Grafana integrations. GrafanaV1 works with "Webhook" option and GrafanaV2 works with "OpsGenie" option. It is not possible to use it another way since the endpoints that OpsGenie receives are different in each option so authentication fails when the wrong option is selected. OpsGenie released its webhook based integration first and later Grafana added OpsGenie as a native integration but they did not use the Grafana endpoint that OG set for GrafanaV1 Integration, they used the OpsGenie's Alert API endpoint. Thus, OpsGenie released GrafanaV2 integration to support the native OpsGenie integration in Grafana. I hope that information will solve your problem.

Contributor

cglrkn commented Sep 15, 2017

@kshcherban OpsGenie has 2 different Grafana integrations. GrafanaV1 works with "Webhook" option and GrafanaV2 works with "OpsGenie" option. It is not possible to use it another way since the endpoints that OpsGenie receives are different in each option so authentication fails when the wrong option is selected. OpsGenie released its webhook based integration first and later Grafana added OpsGenie as a native integration but they did not use the Grafana endpoint that OG set for GrafanaV1 Integration, they used the OpsGenie's Alert API endpoint. Thus, OpsGenie released GrafanaV2 integration to support the native OpsGenie integration in Grafana. I hope that information will solve your problem.

@kshcherban

This comment has been minimized.

Show comment
Hide comment
@kshcherban

kshcherban Sep 15, 2017

@cglrkn that actually explains the issue. GrafanaV1 integration works correctly with latest stable 4.4 Grafana

kshcherban commented Sep 15, 2017

@cglrkn that actually explains the issue. GrafanaV1 integration works correctly with latest stable 4.4 Grafana

@daniellee daniellee closed this Nov 6, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment