Browse Source

Merge pull request #1783 from knyar/json

Allow URLs in targets defined via a JSON file
pull/1889/head
Fabian Reinartz 8 years ago committed by GitHub
parent
commit
be596f82b4
  1. 3
      config/config.go

3
config/config.go

@ -575,9 +575,6 @@ func (tg *TargetGroup) UnmarshalJSON(b []byte) error {
}
tg.Targets = make([]model.LabelSet, 0, len(g.Targets))
for _, t := range g.Targets {
if strings.Contains(t, "/") {
return fmt.Errorf("%q is not a valid hostname", t)
}
tg.Targets = append(tg.Targets, model.LabelSet{
model.AddressLabel: model.LabelValue(t),
})

Loading…
Cancel
Save