Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 170134

Re: copy alarms from root to many datacenters

$
0
0

by alarm name.

 

i give it a next try on some dc's before i made it for the whole "farm".

 

change the last lines of the scripts to:

$alarmLength = 80

$to = Get-DataCenter | where {"testsystem","temp" -notcontains $_.Name}

$tgtAlarm =  "test1", "test2", "test3"

 

$alarms = Get-AlarmDefinition -name $tgtAlarm

$alarms | % {

  Move-Alarm -Alarm $_ -To $to -DeleteOriginal:$false

}

 

some new errors:

- somewhere alarm "test1" will rename to "test" but the description is "original name: test1"

- two errors in powercli that "test" already exist

- the copied alarms in root will be named in "alarm name (moved to dc1, dc2, dc3, dc4, dc5 ... )"; how to change your great script to rename the original name one time?


Viewing all articles
Browse latest Browse all 170134

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>