Hi all.

We were recently testing grouping via the special value '...' for a 
specific Slack receiver. 
Looking at the documentation this seems feasible and correct. However, 
after introducing the grouping, no alert belonging to the receiver was 
delivered to Slack any more. 

The routing configuration looks like the following:

route:
  receiver: 'none'
  group_by: [severity, stack, environment]
  group_wait: 30s
  group_interval: 5m
  repeat_interval: 6h
  routes:
    - receiver: 'slack_firmware_rc'
      match_re:
        stack: xxx
        instance: yyy
    #
    # other "stack"-based receivers here
    #
    - receiver: 'slack_it'
      group_by: ['...']   # disables grouping
      match_re:
        stack: it
    #
    # other "stack"-based receivers here    
    #

I've omitted the other receivers: they weren't touched and seem to continue 
working fine. The only receiver that is not working is the "slack_it" one. 
Notably we reworked also the templates for the receiver but there is *no* error 
in the log at all, meaning the new templates are correctly loaded. Anyway, 
just for completion here are the changed parts:

- name: slack_it
  slack_configs:
  - api_url: 'xxx'
    icon_url: 'yyy'
    username: 'zzz'
    channel: '#out_channel'
    send_resolved: true
    color: '{{ template "yakkity-color" . }}'
    title: '{{ template "yakkity-simple-title" . }}'
    text:  '{{ template "yakkity-simple-text" . }}'
    thumb_url: '{{ template "yakkity-thumb" . }}'


{{ define "yakkity-simple-title" -}}
    {{- with index .Alerts 0 -}}
        {{- .Annotations.summary -}}
    {{- end -}}
{{- end }}


{{ define "yakkity-simple-text" }}
{{- with index .Alerts 0 -}}
    {{- .Annotations.description -}}
{{- end }}


:bar_chart: *<{{ .GeneratorURL }}|Graph>*


{{- if .Annotations.runbook }}   :notebook: *<{{ .Annotations.runbook }}|
Runbook>*  {{- end }}
{{ $filteredLabels := 
"stack|environment|service|job|monitor|severity|hostname" }}
{{ range .Labels.SortedPairs }}{{if not (match $filteredLabels .Name)}}`{{ 
.Name }}={{ .Value }}` {{ end }}{{ end }}
{{ end }}


Any idea what can be wrong with this new setup?
Thanks in advance,
F.


-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/cae6bcd9-227e-4538-9338-8e9842512718o%40googlegroups.com.

Reply via email to