diff --git a/CHANGELOG.md b/CHANGELOG.md index eb72cd5af..fb2553068 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.8.2 / 2017-11-04 + +* [BUGFIX] EC2 service discovery: Do not crash if tags are empty. + ## 2.0.0-rc.2 / 2017-10-25 * [ENHANCEMENT] handle WAL segments with corrupted header gracefully diff --git a/discovery/ec2/ec2.go b/discovery/ec2/ec2.go index d6b66e222..6e538e710 100644 --- a/discovery/ec2/ec2.go +++ b/discovery/ec2/ec2.go @@ -221,6 +221,9 @@ func (d *Discovery) refresh() (tg *config.TargetGroup, err error) { } for _, t := range inst.Tags { + if t == nil || t.Key == nil || t.Value == nil { + continue + } name := strutil.SanitizeLabelName(*t.Key) labels[ec2LabelTag+model.LabelName(name)] = model.LabelValue(*t.Value) }