mirror of
https://github.com/prometheus/prometheus.git
synced 2025-02-02 08:31:11 -08:00
discovery/config: add swarmsd config validation.
Signed-off-by: johncming <johncming@yahoo.com>
This commit is contained in:
parent
d17d20ac27
commit
6da680c7e4
|
@ -83,6 +83,11 @@ func (c *ServiceDiscoveryConfig) Validate() error {
|
|||
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 {
|
||||
if cfg == nil {
|
||||
return errors.New("empty or null section in dns_sd_configs")
|
||||
|
|
Loading…
Reference in a new issue