mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-03-21 15:45:01 +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))
|
rcs.perURL = make([][]promrelabel.ParsedRelabelConfig, len(*remoteWriteURLs))
|
||||||
for i, path := range *relabelConfigPaths {
|
for i, path := range *relabelConfigPaths {
|
||||||
|
if len(path) == 0 {
|
||||||
|
// Skip empty relabel config.
|
||||||
|
continue
|
||||||
|
}
|
||||||
prc, err := promrelabel.LoadRelabelConfigs(path)
|
prc, err := promrelabel.LoadRelabelConfigs(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("cannot load relabel configs from -remoteWrite.urlRelabelConfig=%q: %w", path, err)
|
return nil, fmt.Errorf("cannot load relabel configs from -remoteWrite.urlRelabelConfig=%q: %w", path, err)
|
||||||
|
|
Loading…
Reference in a new issue