r/vmalert: Allow configuring external source URLs

The `-external.url` and `-external.alert.source` command line arguments
and their corresponding environment variables can be used to configure
the "Source" links associated with alerts created by `vmalert`.
btop
Dustin 2022-08-12 12:58:53 -05:00
parent c57500a9f4
commit fe87edea21
2 changed files with 11 additions and 0 deletions

View File

@ -2,3 +2,8 @@ vmalert_datasource_url: http://[::1]:8428
vmalert_notifier_url: http://[::1]:9093
vmalert_remote_read_url: http://[::1]:8428
vmalert_remote_write_url: http://[::1]:8428
vmalert_external_url: https://grafana.pyrocufflink.blue
vmalert_external_alert_source: >-
{% raw -%}
explore?orgId=1&left=%5B"now-1h","now","metrics",%7B"expr":"{{$expr|queryEscape}}"%7D%5D
{%- endraw %}

View File

@ -10,3 +10,9 @@ remoteRead_url={{ vmalert_remote_read_url }}
{% if vmalert_remote_write_url|d %}
remoteWrite_url={{ vmalert_remote_write_url }}
{% endif %}
{% if vmalert_external_url|d %}
external_url={{ vmalert_external_url }}
{% endif %}
{% if vmalert_external_alert_source|d %}
external_alert_source={{ vmalert_external_alert_source }}
{% endif %}