mirror of
https://github.com/prometheus/prometheus
synced 2024-12-24 23:42:32 +00:00
fix nil pointer dereference in azure discovery (#5587)
Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>
This commit is contained in:
parent
d6a4daa26a
commit
d81df5609d
@ -335,7 +335,7 @@ func (d *Discovery) refresh(ctx context.Context) ([]*targetgroup.Group, error) {
|
||||
|
||||
if *networkInterface.Primary {
|
||||
for _, ip := range *networkInterface.IPConfigurations {
|
||||
if ip.PublicIPAddress != nil {
|
||||
if ip.PublicIPAddress != nil && ip.PublicIPAddress.PublicIPAddressPropertiesFormat != nil {
|
||||
labels[azureLabelMachinePublicIP] = model.LabelValue(*ip.PublicIPAddress.IPAddress)
|
||||
}
|
||||
if ip.PrivateIPAddress != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user