mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
app/vmagent/remotewrite: allow passing empty -remoteWrite.urlRelabelConfig
entries
This commit is contained in:
parent
141e84b5a4
commit
86b54f3768
1 changed files with 4 additions and 0 deletions
|
@ -43,6 +43,10 @@ func loadRelabelConfigs() (*relabelConfigs, error) {
|
|||
}
|
||||
rcs.perURL = make([][]promrelabel.ParsedRelabelConfig, len(*remoteWriteURLs))
|
||||
for i, path := range *relabelConfigPaths {
|
||||
if len(path) == 0 {
|
||||
// Skip empty relabel config.
|
||||
continue
|
||||
}
|
||||
prc, err := promrelabel.LoadRelabelConfigs(path)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("cannot load relabel configs from -remoteWrite.urlRelabelConfig=%q: %w", path, err)
|
||||
|
|
Loading…
Reference in a new issue