修复告警 Source 链接并接入 Grafana Alertmanager 数据源 (#152)
yaml / yaml (push) Successful in 51s

Co-authored-by: panxiao81 <[email protected]>
This commit was merged in pull request #152.
This commit is contained in:
2026-09-25 18:02:14 +00:00
committed by panxiao81
parent e8e7bd4b20
commit dbf66590ac
2 changed files with 13 additions and 0 deletions
@@ -32,6 +32,14 @@ datasources:
isDefault: true
jsonData:
prometheusType: Prometheus
- name: Alertmanager
uid: alertmanager
type: alertmanager
access: proxy
url: http://vmalertmanager-main.monitoring.svc:9093
jsonData:
implementation: prometheus
handleGrafanaManagedAlerts: false
- name: VictoriaLogs
type: victoriametrics-logs-datasource
access: proxy
@@ -10,6 +10,11 @@ spec:
replicaCount: 1
selectAllByDefault: true
evaluationInterval: 30s
# 告警 Source 复用已认证的 Grafana 入口,携带表达式和触发时间。
# 整个 Explore JSON 一次性 URL 编码,避免表达式中的引号、&、+ 损坏链接。
extraArgs:
external.url: https://grafana.ad.ddupan.top
external.alert.source: 'explore?left={{ printf "{\"datasource\":\"VictoriaMetrics\",\"queries\":[{\"expr\":%s,\"refId\":\"A\"}],\"range\":{\"from\":\"%d\",\"to\":\"now\"}}" (.Expr | jsonEscape) .ActiveAt.UnixMilli | queryEscape }}'
datasource:
url: http://vmsingle-main.monitoring.svc:8428
remoteWrite: