mirror of https://github.com/prometheus/prometheus
retrieval: don't panic on non-HTTP scheme
parent
9a506fae47
commit
021ef27fe3
|
@ -454,7 +454,7 @@ func targetsFromGroup(tg *config.TargetGroup, cfg *config.ScrapeConfig) ([]*Targ
|
||||||
case "https":
|
case "https":
|
||||||
addr = fmt.Sprintf("%s:443", addr)
|
addr = fmt.Sprintf("%s:443", addr)
|
||||||
default:
|
default:
|
||||||
panic(fmt.Errorf("targetsFromGroup: invalid scheme %q", cfg.Scheme))
|
return nil, fmt.Errorf("invalid scheme: %q", cfg.Scheme)
|
||||||
}
|
}
|
||||||
labels[model.AddressLabel] = model.LabelValue(addr)
|
labels[model.AddressLabel] = model.LabelValue(addr)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue