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

Discord integration: no possibility to configure the webhook content object #3667

Open
aZ2394 opened this issue Jan 11, 2024 · 0 comments
Open

Comments

@aZ2394
Copy link

aZ2394 commented Jan 11, 2024

Hi there,
According to the code of the Discord integration, there is no chance to specify Web hook content field from the message notification template. Just a embed title&message can be configured.
It's useful thing to have it when you want to tag person/role in alert. It can be doable in title&message of the embed message but user won't get a notification due to Discord API limitation.
So, it limit the tagging in Discord integration at all, and there is no chance with the current implementation to notify specific user about the alert.

What did you do?
Sent an alert to discord with the tagged user/role

What did you expect to see?
Tagged user should be notified in Discord client

What did you see instead? Under which circumstances?
Just an mention in alert without any notification for user in Discord client

  • Alertmanager version:

alertmanager, version 0.26.0 (branch: HEAD, revision: d7b4f0c)
build user: root@df8d7debeef4
build date: 20230824-11:11:58
go version: go1.20.7
platform: linux/amd64
tags: netgo

  • Prometheus version:

prometheus, version 2.48.1 (branch: HEAD, revision: 63894216648f0d6be310c9d16fb48293c45c9310)
build user: root@71f108ff5632
build date: 20231208-23:33:22
go version: go1.21.5
platform: linux/amd64
tags: netgo,builtinassets,stringlabels

  • Alertmanager configuration file:
route:
  group_by: ['alertname', 'job']

  group_wait: 30s
  group_interval: 5m
  repeat_interval: 6h

  receiver: discord2

  routes:
      - matchers:
          - service="discord1"
        receiver: discord1
        group_interval: 12h
        repeat_interval: 24h


receivers:
- name: discord1
  discord_configs:
  - webhook_url: ''
    title: '{{ template "discord.default.title" . }}'
    message: '{{ template "discord.default.message" . }}'

- name: discord2
  discord_configs:
  - webhook_url: ''
    title: '{{ template "discord.default2.title" . }}'
    message: '{{ template "discord.default2.message" . }}'
    send_resolved: false


templates:
- '/etc/alertmanager/templates/default.tmpl'
  • Prometheus configuration file:
insert configuration here (if relevant to the issue)
  • Logs:
insert Prometheus and Alertmanager logs relevant to the issue here
@aZ2394 aZ2394 changed the title Discord integration: add possibility to configure the webhook content object Discord integration: no possibility to configure the webhook content object Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant