fix: update default pagerduty message (#2617)

This commit is contained in:
Srikanth Chekuri 2023-04-26 19:57:28 +05:30 committed by GitHub
parent 33ac5b79be
commit f45ac7855e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,15 +1,17 @@
import { PagerChannel } from './config'; import { PagerChannel } from './config';
export const PagerInitialConfig: Partial<PagerChannel> = { export const PagerInitialConfig: Partial<PagerChannel> = {
description: `{{ range .Alerts -}} description: `[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] {{ .CommonLabels.alertname }} for {{ .CommonLabels.job }}
*Alert:* {{ if .Annotations.title }} {{ .Annotations.title }} {{ else }} {{ .Annotations.summary }} {{end}} {{ if .Labels.severity }} - {{ .Labels.severity }}{{ end }} {{- if gt (len .CommonLabels) (len .GroupLabels) -}}
{{" "}}(
*Description:* {{ .Annotations.description }} {{- with .CommonLabels.Remove .GroupLabels.Names }}
{{- range $index, $label := .SortedPairs -}}
*Details:* {{ if $index }}, {{ end }}
{{ range .Labels.SortedPairs }} *{{ .Name }}:* {{ .Value }} {{- $label.Name }}="{{ $label.Value -}}"
{{ end }} {{- end }}
{{ end }}`, {{- end -}}
)
{{- end }}`,
severity: '{{ (index .Alerts 0).Labels.severity }}', severity: '{{ (index .Alerts 0).Labels.severity }}',
client: 'SigNoz Alert Manager', client: 'SigNoz Alert Manager',
client_url: 'https://enter-signoz-host-n-port-here/alerts', client_url: 'https://enter-signoz-host-n-port-here/alerts',