How can I change alarm

Hello

I would try the following, please provide your inputs!

I am using PowerCLI to change the Type of trigger for alarm 'Datastore Disk use %' warning and alert of 75/85 for a new watermark.

Is this possible? Any help would be really appreciated. Thank you very much!

alarm.jpg

With the current construction of PowerCLI, you cannot change triggers yet, but you can use the API.

Something like that

$alarmName = "Datastore disk usage"$newYellow = 80$newRed = 85$alarm = Get-AlarmDefinition -Name $alarmName

$spec = New-Object VMware.Vim.AlarmSpec$spec.Enabled = $alarm.ExtensionData.Info.Enabled$spec.Description = $alarm.ExtensionData.Info.Description$spec.Name = $alarm.ExtensionData.Info.Name$spec.Expression = $alarm.ExtensionData.Info.Expression$spec.Expression.Expression[0].Yellow = $newYellow * 100$spec.Expression.Expression[0].Red = $newRed * 100

$alarm.ExtensionData.ReconfigureAlarm($spec)

Tags: VMware

Similar Questions

Maybe you are looking for

  • How to upgrade the fields in word

    Hello world Is it possible to update all fields, as explained here (update a reference from one page to the other) https://support.Office.com/en-us/article/Create-or-update-a-cross-reference-aa35c606-34e8-4c64-B6EB-... to update cross-references link

  • SPORE on Windows 7 installs but doesn't start. Message says "Spore has stopped working".

    I recently bought the game spore original and installed on my compaq cq5320f. It installed correctly but when I try to run the game, the screen goes out for a second, then an error message box saying "spore has stopped working" it self closes and say

  • Dell Back Up & recovery by acting weird

    Hiya I have a new 660 s Inspiron, I with G2020 processor, 4 GB RAM, HDD 500 GB and McAfee installed. I tried to use the back up and restore, but it looks like this. I've uninstalled and reinstalled twice and updated, but it does not change. BTW, this

  • Reinstalled XP, but no Internet connection

    Hello and Hello. I have an old Compaq Presario. 6122AP desktop PC I had to reinstall XP using the original disk from Compaq and had the impression that this wipe the hard drive and do a clean install. This is not the case, as all the old files are st

  • DRIVER MUSTEK WCAM 300 7 WINWOWS

    LOOKING FOR DRIVER, MUSTEK WCAM 300 WINDOWS 7