diff --git a/pkg/cluster/embed/autogen_pkger.go b/pkg/cluster/embed/autogen_pkger.go index 19601e0d9d..ca625116f2 100644 --- a/pkg/cluster/embed/autogen_pkger.go +++ b/pkg/cluster/embed/autogen_pkger.go @@ -22,7 +22,7 @@ func init() { autogenFiles["/templates/config/datasource.yml.tpl"] = "YXBpVmVyc2lvbjogMQpkZWxldGVEYXRhc291cmNlczoKICAtIG5hbWU6IHt7LkNsdXN0ZXJOYW1lfX0KZGF0YXNvdXJjZXM6CiAgLSBuYW1lOiB7ey5DbHVzdGVyTmFtZX19CiAgICB0eXBlOiBwcm9tZXRoZXVzCiAgICBhY2Nlc3M6IHByb3h5CiAgICB1cmw6IGh0dHA6Ly97ey5JUH19Ont7LlBvcnR9fQogICAgd2l0aENyZWRlbnRpYWxzOiBmYWxzZQogICAgaXNEZWZhdWx0OiBmYWxzZQogICAgdGxzQXV0aDogZmFsc2UKICAgIHRsc0F1dGhXaXRoQ0FDZXJ0OiBmYWxzZQogICAgdmVyc2lvbjogMQogICAgZWRpdGFibGU6IHRydWU=" autogenFiles["/templates/config/dm/prometheus.yml.tpl"] = "LS0tCmdsb2JhbDoKICBzY3JhcGVfaW50ZXJ2YWw6ICAgICAxNXMgIyBCeSBkZWZhdWx0LCBzY3JhcGUgdGFyZ2V0cyBldmVyeSAxNSBzZWNvbmRzLgogIGV2YWx1YXRpb25faW50ZXJ2YWw6IDE1cyAjIEJ5IGRlZmF1bHQsIHNjcmFwZSB0YXJnZXRzIGV2ZXJ5IDE1IHNlY29uZHMuCiAgIyBzY3JhcGVfdGltZW91dCBpcyBzZXQgdG8gdGhlIGdsb2JhbCBkZWZhdWx0ICgxMHMpLgogIGV4dGVybmFsX2xhYmVsczoKICAgIGNsdXN0ZXI6ICd7ey5DbHVzdGVyTmFtZX19JwogICAgbW9uaXRvcjogInByb21ldGhldXMiCgojIExvYWQgYW5kIGV2YWx1YXRlIHJ1bGVzIGluIHRoaXMgZmlsZSBldmVyeSAnZXZhbHVhdGlvb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kcnN9fQogICAgICAtICd7ey59fScKe3stIGVuZH19CiAgICAgIGxhYmVsczoKICAgICAgICBncm91cDogJ3B1bXAnCiAgICAtIHRhcmdldHM6CiAgICB7ey0gcmFuZ2UgLkRyYWluZXJBZGRyc319CiAgICAgIC0gJ3t7Ln19JwogICAge3stIGVuZH19CiAgICAgIGxhYmVsczoKICAgICAgICBncm91cDogJ2RyYWluZXInCnt7LSBpZiAuS2Fma2FFeHBvcnRlckFkZHJ9fQogICAgLSB0YXJnZXRzOgogICAgICAtICd7ey5LYWZrYUV4cG9ydGVyQWRkcn19JwogICAgICBsYWJlbHM6CiAgICAgICAgZ3JvdXA6ICdrYWZrYV9leHBvcnRlcicKe3stIGVuZH19CiAgICByZWxhYmVsX2NvbmZpZ3M6CiAgICAgIC0gc291cmNlX2xhYmVsczogW19fYWRkcmVzc19fXQogICAgICAgIHRhcmdldF9sYWJlbDogX19wYXJhbV90YXJnZXQKICAgICAgLSBzb3VyY2VfbGFiZWxzOiBbX19wYXJhbV90YXJnZXRdCiAgICAgICAgdGFyZ2V0X2xhYmVsOiBpbnN0YW5jZQogICAgICAtIHRhcmdldF9sYWJlbDogX19hZGRyZXNzX18KICAgICAgICByZXBsYWNlbWVudDoge3suQmxhY2tib3hBZGRyfX0Ke3stIGVuZH19Cnt7LSBpZiAuQ0RDQWRkcnN9fQogIC0gam9iX25hbWU6ICJ0aWNkYyIKICAgIGhvbm9yX2xhYmVsczogdHJ1ZSAjIGRvbid0IG92ZXJ3cml0ZSBqb2IgJiBpbnN0YW5jZSBsYWJlbHMKe3stIGlmIC5UTFNFbmFibGVkfX0KICAgIHNjaGVtZTogaHR0cHMKICAgIHRsc19jb25maWc6CiAgICAgIGluc2VjdXJlX3NraXBfdmVyaWZ5OiBmYWxzZQogICAgICBjYV9maWxlOiAuLi90bHMvY2EuY3J0CiAgICAgIGNlcnRfZmlsZTogLi4vdGxzL3Byb21ldGhldXMuY3J0CiAgICAgIGtleV9maWxlOiAuLi90bHMvcHJv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oKe3stIGlmIC5OdW1hTm9kZX19CmV4ZWMgbnVtYWN0bCAtLWNwdW5vZGViaW5kPXt7Lk51bWFOb2RlfX0gLS1tZW1iaW5kPXt7Lk51bWFOb2RlfX0gYmluL2FsZXJ0bWFuYWdlciBcCnt7LSBlbHNlfX0KZXhlYyBiaW4vYWxlcnRtYW5hZ2VyL2FsZXJ0bWFuYWdlciBcCnt7LSBlbmR9fQogICAgLS1jb25maWcuZmlsZT0iY29uZi9hbGVydG1hbmFnZXIueW1sIiBcCiAgICAtLXN0b3JhZ2UucGF0aD0ie3suRGF0YURpcn19IiBcCiAgICAtLWRhdGEucmV0ZW50aW9uPTEyMGggXAogICAgLS1sb2cubGV2ZWw9ImluZm8iIFwKICAgIC0td2ViLmxpc3Rlbi1hZGRyZXNzPSJ7ey5JUH19Ont7LldlYlBvcnR9fSIgXAp7ey0gaWYgLkVuZFBvaW50c319Cnt7LSByYW5nZSAkaWR4LCAkYW0gOj0gLkVuZFBvaW50c319CiAgICAtLWNsdXN0ZXIucGVlcj0ie3skYW0uSVB9fTp7eyRhbS5DbHVzdGVyUG9ydH19IiBcCnt7LSBlbmR9fQp7ey0gZW5kfX0KICAgIC0tY2x1c3Rlci5saXN0ZW4tYWRkcmVzcz0ie3suSVB9fTp7ey5DbHVzdGVyUG9ydH19Igo=" diff --git a/pkg/cluster/spec/instance.go b/pkg/cluster/spec/instance.go index 3dbbe865f4..0a4ec96e58 100644 --- a/pkg/cluster/spec/instance.go +++ b/pkg/cluster/spec/instance.go @@ -191,19 +191,29 @@ func (i *BaseInstance) TransferLocalConfigFile(ctx context.Context, e ctxt.Execu // TransferLocalConfigDir scp local config directory to remote // Precondition: the user on remote have right to access & mkdir of dest files func (i *BaseInstance) TransferLocalConfigDir(ctx context.Context, e ctxt.Executor, local, remote string, filter func(string) bool) error { + return i.IteratorLocalConfigDir(ctx, local, filter, func(fname string) error { + localPath := path.Join(local, fname) + remotePath := path.Join(remote, fname) + if err := i.TransferLocalConfigFile(ctx, e, localPath, remotePath); err != nil { + return errors.Annotatef(err, "transfer local config (%s -> %s) failed", localPath, remotePath) + } + return nil + }) +} + +// IteratorLocalConfigDir iterators the local dir with filter, then invoke f for each found fileName +func (i *BaseInstance) IteratorLocalConfigDir(ctx context.Context, local string, filter func(string) bool, f func(string) error) error { files, err := ioutil.ReadDir(local) if err != nil { return errors.Annotatef(err, "read local directory %s failed", local) } - for _, f := range files { - if filter != nil && !filter(f.Name()) { + for _, file := range files { + if filter != nil && !filter(file.Name()) { continue } - localPath := path.Join(local, f.Name()) - remotePath := path.Join(remote, f.Name()) - if err := i.TransferLocalConfigFile(ctx, e, localPath, remotePath); err != nil { - return errors.Annotatef(err, "transfer local config (%s -> %s) failed", localPath, remotePath) + if err := f(file.Name()); err != nil { + return err } } diff --git a/pkg/cluster/spec/prometheus.go b/pkg/cluster/spec/prometheus.go index ea7cd27282..a4b93b912c 100644 --- a/pkg/cluster/spec/prometheus.go +++ b/pkg/cluster/spec/prometheus.go @@ -253,6 +253,17 @@ func (i *MonitorInstance) InitConfig( } } + if spec.RuleDir != "" { + filter := func(name string) bool { return strings.HasSuffix(name, ".rules.yml") } + err := i.IteratorLocalConfigDir(ctx, spec.RuleDir, filter, func(name string) error { + cfig.AddLocalRule(name) + return nil + }) + if err != nil { + return errors.Annotate(err, "add local rule") + } + } + if err := i.installRules(ctx, e, paths.Deploy, clusterVersion); err != nil { return errors.Annotate(err, "install rules") } diff --git a/pkg/cluster/template/config/prometheus.go b/pkg/cluster/template/config/prometheus.go index c62f56acd3..fdefaede0c 100644 --- a/pkg/cluster/template/config/prometheus.go +++ b/pkg/cluster/template/config/prometheus.go @@ -49,6 +49,8 @@ type PrometheusConfig struct { DMMasterAddrs []string DMWorkerAddrs []string + + LocalRules []string } // NewPrometheusConfig returns a PrometheusConfig @@ -185,6 +187,12 @@ func (c *PrometheusConfig) AddDMWorker(ip string, port uint64) *PrometheusConfig return c } +// AddLocalRule add a local rule +func (c *PrometheusConfig) AddLocalRule(rule string) *PrometheusConfig { + c.LocalRules = append(c.LocalRules, rule) + return c +} + // Config generate the config file data. func (c *PrometheusConfig) Config() ([]byte, error) { fp := path.Join("/templates", "config", "prometheus.yml.tpl") diff --git a/templates/config/prometheus.yml.tpl b/templates/config/prometheus.yml.tpl index 43af42822a..1940522f80 100644 --- a/templates/config/prometheus.yml.tpl +++ b/templates/config/prometheus.yml.tpl @@ -14,6 +14,9 @@ rule_files: - 'blacker.rules.yml' - 'bypass.rules.yml' {{- end}} +{{- range .LocalRules}} + - '{{.}}' +{{- end}} {{- if .PDAddrs}} - 'pd.rules.yml' {{- end}} @@ -48,11 +51,11 @@ rule_files: {{- if .AlertmanagerAddrs}} alerting: - alertmanagers: - - static_configs: - - targets: + alertmanagers: + - static_configs: + - targets: {{- range .AlertmanagerAddrs}} - - '{{.}}' + - '{{.}}' {{- end}} {{- end}}