|
|
|
|
@ -46,7 +46,7 @@ func TestOpsgenieNotifier(t *testing.T) { |
|
|
|
|
}, |
|
|
|
|
expMsg: `{ |
|
|
|
|
"alias": "6e3538104c14b583da237e9693b76debbc17f0f8058ef20492e5853096cf8733", |
|
|
|
|
"description": "[FIRING:1] (val1)\nhttp://localhost/alerting/list\n\n**Firing**\n\nValue: <no value>\nLabels:\n - alertname = alert1\n - lbl1 = val1\nAnnotations:\n - ann1 = annv1\nSilence: http://localhost/alerting/silence/new?alertmanager=grafana&matchers=alertname%3Dalert1%2Clbl1%3Dval1\nDashboard: http://localhost/d/abcd\nPanel: http://localhost/d/abcd?viewPanel=efgh\n", |
|
|
|
|
"description": "[FIRING:1] (val1)\nhttp://localhost/alerting/list\n\n**Firing**\n\nValue: [no value]\nLabels:\n - alertname = alert1\n - lbl1 = val1\nAnnotations:\n - ann1 = annv1\nSilence: http://localhost/alerting/silence/new?alertmanager=grafana&matchers=alertname%3Dalert1%2Clbl1%3Dval1\nDashboard: http://localhost/d/abcd\nPanel: http://localhost/d/abcd?viewPanel=efgh\n", |
|
|
|
|
"details": { |
|
|
|
|
"url": "http://localhost/alerting/list" |
|
|
|
|
}, |
|
|
|
|
@ -71,7 +71,7 @@ func TestOpsgenieNotifier(t *testing.T) { |
|
|
|
|
}, |
|
|
|
|
expMsg: `{ |
|
|
|
|
"alias": "6e3538104c14b583da237e9693b76debbc17f0f8058ef20492e5853096cf8733", |
|
|
|
|
"description": "[FIRING:1] (val1)\nhttp://localhost/alerting/list\n\n**Firing**\n\nValue: <no value>\nLabels:\n - alertname = alert1\n - lbl1 = val1\nAnnotations:\n - ann1 = annv1\nSilence: http://localhost/alerting/silence/new?alertmanager=grafana&matchers=alertname%3Dalert1%2Clbl1%3Dval1\n", |
|
|
|
|
"description": "[FIRING:1] (val1)\nhttp://localhost/alerting/list\n\n**Firing**\n\nValue: [no value]\nLabels:\n - alertname = alert1\n - lbl1 = val1\nAnnotations:\n - ann1 = annv1\nSilence: http://localhost/alerting/silence/new?alertmanager=grafana&matchers=alertname%3Dalert1%2Clbl1%3Dval1\n", |
|
|
|
|
"details": { |
|
|
|
|
"url": "http://localhost/alerting/list" |
|
|
|
|
}, |
|
|
|
|
@ -96,7 +96,7 @@ func TestOpsgenieNotifier(t *testing.T) { |
|
|
|
|
}, |
|
|
|
|
expMsg: `{ |
|
|
|
|
"alias": "6e3538104c14b583da237e9693b76debbc17f0f8058ef20492e5853096cf8733", |
|
|
|
|
"description": "[FIRING:1] (val1)\nhttp://localhost/alerting/list\n\n**Firing**\n\nValue: <no value>\nLabels:\n - alertname = alert1\n - lbl1 = val1\nAnnotations:\n - ann1 = annv1\nSilence: http://localhost/alerting/silence/new?alertmanager=grafana&matchers=alertname%3Dalert1%2Clbl1%3Dval1\n", |
|
|
|
|
"description": "[FIRING:1] (val1)\nhttp://localhost/alerting/list\n\n**Firing**\n\nValue: [no value]\nLabels:\n - alertname = alert1\n - lbl1 = val1\nAnnotations:\n - ann1 = annv1\nSilence: http://localhost/alerting/silence/new?alertmanager=grafana&matchers=alertname%3Dalert1%2Clbl1%3Dval1\n", |
|
|
|
|
"details": { |
|
|
|
|
"alertname": "alert1", |
|
|
|
|
"lbl1": "val1", |
|
|
|
|
@ -128,7 +128,7 @@ func TestOpsgenieNotifier(t *testing.T) { |
|
|
|
|
}, |
|
|
|
|
expMsg: `{ |
|
|
|
|
"alias": "6e3538104c14b583da237e9693b76debbc17f0f8058ef20492e5853096cf8733", |
|
|
|
|
"description": "[FIRING:2] \nhttp://localhost/alerting/list\n\n**Firing**\n\nValue: <no value>\nLabels:\n - alertname = alert1\n - lbl1 = val1\nAnnotations:\n - ann1 = annv1\nSilence: http://localhost/alerting/silence/new?alertmanager=grafana&matchers=alertname%3Dalert1%2Clbl1%3Dval1\n\nValue: <no value>\nLabels:\n - alertname = alert1\n - lbl1 = val2\nAnnotations:\n - ann1 = annv1\nSilence: http://localhost/alerting/silence/new?alertmanager=grafana&matchers=alertname%3Dalert1%2Clbl1%3Dval2\n", |
|
|
|
|
"description": "[FIRING:2] \nhttp://localhost/alerting/list\n\n**Firing**\n\nValue: [no value]\nLabels:\n - alertname = alert1\n - lbl1 = val1\nAnnotations:\n - ann1 = annv1\nSilence: http://localhost/alerting/silence/new?alertmanager=grafana&matchers=alertname%3Dalert1%2Clbl1%3Dval1\n\nValue: [no value]\nLabels:\n - alertname = alert1\n - lbl1 = val2\nAnnotations:\n - ann1 = annv1\nSilence: http://localhost/alerting/silence/new?alertmanager=grafana&matchers=alertname%3Dalert1%2Clbl1%3Dval2\n", |
|
|
|
|
"details": { |
|
|
|
|
"alertname": "alert1", |
|
|
|
|
"url": "http://localhost/alerting/list" |
|
|
|
|
|