mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-25 21:54:10 -08:00
Merge pull request #7615 from johncming/swarmsd_config
discovery/config: add swarmsd config validation.
This commit is contained in:
commit
e0c0f996b3
|
@ -83,6 +83,11 @@ func (c *ServiceDiscoveryConfig) Validate() error {
|
||||||
return errors.New("empty or null section in digitalocean_sd_configs")
|
return errors.New("empty or null section in digitalocean_sd_configs")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
for _, cfg := range c.DockerSwarmSDConfigs {
|
||||||
|
if cfg == nil {
|
||||||
|
return errors.New("empty or null section in dockerswarm_sd_configs")
|
||||||
|
}
|
||||||
|
}
|
||||||
for _, cfg := range c.DNSSDConfigs {
|
for _, cfg := range c.DNSSDConfigs {
|
||||||
if cfg == nil {
|
if cfg == nil {
|
||||||
return errors.New("empty or null section in dns_sd_configs")
|
return errors.New("empty or null section in dns_sd_configs")
|
||||||
|
|
Loading…
Reference in a new issue