Skip to content
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

OpsGenie: refer to alert instead of incident #2609

Merged
merged 1 commit into from
Aug 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -761,14 +761,14 @@ OpsGenie notifications are sent via the [OpsGenie API](https://docs.opsgenie.com
# Alert text limited to 130 characters.
[ message: <tmpl_string> ]

# A description of the incident.
# A description of the alert.
[ description: <tmpl_string> | default = '{{ template "opsgenie.default.description" . }}' ]

# A backlink to the sender of the notification.
[ source: <tmpl_string> | default = '{{ template "opsgenie.default.source" . }}' ]

# A set of arbitrary key/value pairs that provide further detail
# about the incident.
# about the alert.
# All common labels are included as details by default.
[ details: { <string>: <tmpl_string>, ... } ]

Expand Down
4 changes: 2 additions & 2 deletions notify/opsgenie/opsgenie.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func (n *Notifier) createRequest(ctx context.Context, as ...*types.Alert) (*http
}
data := notify.GetTemplateData(ctx, n.tmpl, as, n.logger)

level.Debug(n.logger).Log("incident", key)
level.Debug(n.logger).Log("alert", key)

tmpl := notify.TmplText(n.tmpl, data, &err)

Expand Down Expand Up @@ -146,7 +146,7 @@ func (n *Notifier) createRequest(ctx context.Context, as ...*types.Alert) (*http
default:
message, truncated := notify.Truncate(tmpl(n.conf.Message), 130)
if truncated {
level.Debug(n.logger).Log("msg", "truncated message", "truncated_message", message, "incident", key)
level.Debug(n.logger).Log("msg", "truncated message", "truncated_message", message, "alert", key)
}

apiURL.Path += "v2/alerts"
Expand Down