custom alerting

Signed-off-by: junotx <junotx@126.com>
This commit is contained in:
junotx
2020-11-24 17:56:26 +08:00
parent 242193ddb0
commit 371c9b187d
342 changed files with 64021 additions and 1934 deletions

View File

@@ -28,6 +28,7 @@ import (
"kubesphere.io/kubesphere/pkg/simple/client/alerting"
auditingclient "kubesphere.io/kubesphere/pkg/simple/client/auditing/elasticsearch"
"kubesphere.io/kubesphere/pkg/simple/client/cache"
"kubesphere.io/kubesphere/pkg/simple/client/customalerting"
"kubesphere.io/kubesphere/pkg/simple/client/devops/jenkins"
eventsclient "kubesphere.io/kubesphere/pkg/simple/client/events/elasticsearch"
"kubesphere.io/kubesphere/pkg/simple/client/k8s"
@@ -156,6 +157,11 @@ func newTestConfig() (*Config, error) {
IndexPrefix: "ks-logstash-auditing",
Version: "6",
},
CustomAlertingOptions: &customalerting.Options{
PrometheusEndpoint: "http://prometheus-operated.kubesphere-monitoring-system.svc",
ThanosRulerEndpoint: "http://thanos-ruler-operated.kubesphere-monitoring-system.svc",
ThanosRuleResourceLabels: "thanosruler=thanos-ruler,role=thanos-alerting-rules",
},
}
return conf, nil
}