mirror of
https://github.com/prometheus/prometheus
synced 2026-04-30 23:11:34 +08:00
Azure: Fix panic when no computername is set (#9387)
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user