mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-24 21:24:05 -08:00
Azure: Fix panic when no computername is set (#9387)
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
This commit is contained in:
parent
3e494eac71
commit
1681a8d539
|
@ -464,7 +464,9 @@ func mapFromVM(vm compute.VirtualMachine) virtualMachine {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if vm.VirtualMachineProperties != nil && vm.VirtualMachineProperties.OsProfile != nil {
|
if vm.VirtualMachineProperties != nil &&
|
||||||
|
vm.VirtualMachineProperties.OsProfile != nil &&
|
||||||
|
vm.VirtualMachineProperties.OsProfile.ComputerName != nil {
|
||||||
computerName = *(vm.VirtualMachineProperties.OsProfile.ComputerName)
|
computerName = *(vm.VirtualMachineProperties.OsProfile.ComputerName)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue