We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 44cac7d commit 8b048f6Copy full SHA for 8b048f6
1 file changed
main.go
@@ -169,8 +169,11 @@ func (t *AugmentedTask) ExporterInformation() []*PrometheusTaskInfo {
169
if len(t.EC2Instance.NetworkInterfaces) == 0 {
170
return ret
171
}
172
+
173
for _, iface := range t.EC2Instance.NetworkInterfaces {
- if iface.PrivateIpAddress != nil && *iface.PrivateIpAddress != "" {
174
+ if iface.PrivateIpAddress != nil && *iface.PrivateIpAddress != "" &&
175
+ iface.PrivateDnsName != nil && *iface.PrivateDnsName != "" &&
176
+ *iface.PrivateDnsName == *t.EC2Instance.PrivateDnsName {
177
ip = *iface.PrivateIpAddress
178
break
179
0 commit comments