Closed Katnopic closed 3 years ago
Hello, it's a bug, slack_config wasn't rendered correctly. It must be fixed at related PR.
Docker image version based on v0.19.1 release - victoriametrics/operator:fixes-alertmanager-config
can be used for testing.
@f41gh7 Hi, thanks for the update i've tested the image, it did add the slack config to the file, but there is still the webhook section that't being added and is causing errors, and also the configurations did not get merged (the vmalertmanagerconfig and the secret)...
this is the new configuration now inside the pod:
global:
resolve_timeout: 5m
route:
receiver: webhook
routes:
- matchers:
- namespace = "victoria-metrics"
receiver: victoria-metrics-slack-slack
continue: true
group_wait: 30s
group_interval: 5m
repeat_interval: 12h
receivers:
- name: webhook
webhook_configs:
- url: http://localhost:30500/
- name: victoria-metrics-slack-slack
slack_configs:
- api_url: <redacted>
send_resolved: true
channel: <redacted>
color: '{{ template "slack.<redacted>.color" . }}'
text: '{{ template "slack.<redacted>.text" . }}'
title: '{{ template "slack.<redacted>.title" . }}'
actions:
- text: 'Silence :no_bell:'
url: '{{ template "__alert_silence_link" . }}'
type: button
- text: 'Query :mag:'
url: '{{ (index .Alerts 0).GeneratorURL }}'
type: button
templates: []
Thanks for testing, indeed, there was another issue with it. It must be fixed at commit a4d884a1bec13ff188d45e902a3b6736224e37ae.
Related docker image - victoriametrics/operator:gh-339
Those changes will be included into the next release
@f41gh7 Thanks alot! will test this soon and update
Fix added to the release version with v0.20.0.
Sorry for delay with release
Hello,
I've been trying to configure VMAlertManager with VMAlertManagerConfig. i want to map a custom template to my configuration, and because i've seen it's currently not supported in VMAlertManagerConfig object, i need to configure a config secret and add it there, and as stated by the documentation, the configurations will be merged. but i seem to fail to do so, and the merge adds some unwanted content that causes errors for me.
I am using victoria-metrics-operator installed through helm, chart version 0.3.0, app version 0.19.0, default values.
here are the relevant files:
VMAlertManagerConfig:
the secret named 'slack' with apiURL is populated with a valid URL to my slack webhook
Config secret file:
VMAlertManager:
after applying all of the above, the alertmanager-config secret object changes to this:
and the content of the secret is as follows:
as you can see, the slack config is being added, but the templates don't, and for some reason i get a webhook_configs section that causes errors in alert-manager:
Would really like help with this one to get it to work. Also, 2 quick questions regarding VMAlertManager object:
Thanks alot!