Skip to content

Commit

Permalink
Fix TidbMonitor template error (pingcap#1745)
Browse files Browse the repository at this point in the history
* Fix TidbMonitor template error
  • Loading branch information
Yisaer authored and Song Gao committed Feb 24, 2020
1 parent e167fd5 commit 0092d51
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/monitor/monitor/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func init() {
if err != nil {
klog.Fatalf("monitor regex template parse error,%v", err)
}
tikvPattern, err = config.NewRegexp(".*\\-tikv\\-\\d*$")
tikvPattern, err = config.NewRegexp("tikv")
if err != nil {
klog.Fatalf("monitor regex template parse error,%v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/monitor/monitor/template_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ scrape_configs:
regex: target
action: keep
- source_labels: [__meta_kubernetes_pod_label_app_kubernetes_io_component]
regex: .*\-tikv\-\d*$
regex: tikv
action: keep
- source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape]
regex: "true"
Expand Down

0 comments on commit 0092d51

Please sign in to comment.