mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-09 23:24:05 -08: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 a new issue