修复告警 Source 链接并接入 Grafana Alertmanager 数据源 #152
@@ -32,6 +32,14 @@ datasources:
|
|||||||
isDefault: true
|
isDefault: true
|
||||||
jsonData:
|
jsonData:
|
||||||
prometheusType: Prometheus
|
prometheusType: Prometheus
|
||||||
|
- name: Alertmanager
|
||||||
|
uid: alertmanager
|
||||||
|
type: alertmanager
|
||||||
|
access: proxy
|
||||||
|
url: http://vmalertmanager-main.monitoring.svc:9093
|
||||||
|
jsonData:
|
||||||
|
implementation: prometheus
|
||||||
|
handleGrafanaManagedAlerts: false
|
||||||
- name: VictoriaLogs
|
- name: VictoriaLogs
|
||||||
type: victoriametrics-logs-datasource
|
type: victoriametrics-logs-datasource
|
||||||
access: proxy
|
access: proxy
|
||||||
|
|||||||
@@ -10,6 +10,11 @@ spec:
|
|||||||
replicaCount: 1
|
replicaCount: 1
|
||||||
selectAllByDefault: true
|
selectAllByDefault: true
|
||||||
evaluationInterval: 30s
|
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:
|
datasource:
|
||||||
url: http://vmsingle-main.monitoring.svc:8428
|
url: http://vmsingle-main.monitoring.svc:8428
|
||||||
remoteWrite:
|
remoteWrite:
|
||||||
|
|||||||
Reference in New Issue
Block a user