Issue with Loading Alertmanager Config in Helm
TLDR Borislav is having trouble loading alertmanager configuration and queries about a declarative way to define alert channels. Srikanth informs that there is no such feature available currently.
1
Oct 24, 2023 (1 month ago)
Borislav
12:32 AM
alertmanager:
# Using the config, alertmanager.yml file is created.
# We no longer need the config file as query services
# delivers the required config.
extraArgs:
config.file: /etc/alertmanager/alertmanager.yml
log.level: debug
config:
global:
resolve_timeout: 1m
templates:
- '/etc/alertmanager/*.tmpl'
receivers:
- name: 'slack-notifications'
slack_configs:
- channel: '#alert-test'
api_url: ************
send_resolved: true
title: '{{`{{ template "slack.title" . }}`}}'
text: '{{`{{ template "slack.text" . }}`}}'
route:
receiver: 'slack-notifications'
# Templates are no longer needed as they are included
# from frontend placeholder while creating alert channels.
templates:
title.tmpl: |-
{{`
{{ define "slack.title" }}
[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] {{ .CommonLabels.alertname }} for {{ .CommonLabels.job }}
{{- if gt (len .CommonLabels) (len .GroupLabels) -}}
{{" "}}(
{{- with .CommonLabels.Remove .GroupLabels.Names }}
{{- range $index, $label := .SortedPairs -}}
{{ if $index }}, {{ end }}
{{- $label.Name }}="{{ $label.Value -}}"
{{- end }}
{{- end -}}
)
{{- end }}
{{ end }}
`}}
text.tmpl: |-
{{`
{{ define "slack.text" }}
{{ range .Alerts -}}
*Alert:* {{ .Labels.alertname }}{{ if .Labels.severity }} - *{{ .Labels.severity }}*{{ end }}
*Summary:* {{ .Annotations.summary }}
*Description:* {{ .Annotations.description }}
*Details:*
{{ range .Labels.SortedPairs }} • *{{ .Name }}:* `}}`{{`{{ .Value }}`}}`{{`
{{ end }}
{{ end }}
{{ end }}
`}}
configmapReload:
## If false, the configmap-reload container will not be deployed
##
enabled: true
If I add or remove the extra args I still cannot get the config to reload. The alertmanager pod starts up but has only the default receiver and not my receiver.
1
Oct 27, 2023 (1 month ago)
Borislav
08:26 AMSrikanth
11:56 AMSigNoz Community
Indexed 1023 threads (61% resolved)
Similar Threads
Extracting Custom Fields as Attributes from Log in SigNoz
Harald wants to have custom fields from their body parsed as attributes in the SigNoz logger. They have tried implementing suggestions from nitya-signoz and Prashant, but the issue remains unsolved due to a potential race condition encountered while executing the code. They have provided a full example using Kind for further assistance.
JSON Parsing Issue with Logs in Signoz
Androw had trouble parsing logs with JSON in Signoz. nitya-signoz suggested changes to config, which resolved the issue after Androw added the missing field 'logsCollection'.
Troubleshooting SigNoz Auto-Instrumentation Configuration
igor is having trouble configuring auto-instrumentation for Java applications using SigNoz, with traces not appearing in the SigNoz UI. Prashant advises to check logs of the otel sidecar, use service name for endpoint, verify supported libraries, and test with telemetrygen. However, the issue still persists.