qwert1235
Enthusiast
Enthusiast

Guys,

Thank you very much for your input!!!

My VCs, will not be to able talk to each other, neither (sometimes) my CLI will not be able to talk to both VCs at the same time. The best option would be to import alarms from VC1 into something like file and export/apply later on to VC2, but does not look like it will work.

Looks like the path should be like that:

1. Delete all alrms on VC2

2. Create new alarms on VC2 identical alarms on VC1.

I think, it’s should be doable.

I know (a little bit) how to create alarms and how to delete them.

For example, I know how to delete specific alarm (LucD helped me a lot last time):

$alarmManager = Get-View -Id 'AlarmManager-AlarmManager'

$entityView = Get-View (Get-Folder -Name "Datacenters").ID

$alarmMoRefList = $alarmManager.GetAlarm($entityView.MoRef)

$alarmViewList = $alarmMoRefList | foreach { Get-View $_}

$alarmToDelete = $alarmViewList | where {$_.Info.Name -eq "Name of alrm"}

if ($alarmToDelete -ne $null){$alarmToDelete.RemoveAlarm()}

but how I can delete ALL alarms defined in my Datacenter at once?

Can you please help me to figure out how to delete all alarms that already in my “alarmMoRefList”?

Thanks a lot!

Reply
0 Kudos