A user asked about creating a trigger alert for VMware disabled pools. They are wondering if it is possible to exclude specific pools from the check. A colleague responded that it is possible using the filter editor and suggested a few options, including using regex, wild cards, exporting and editing the JSON, and using cmdlets to interact with triggers. They also suggested contacting them for a call to discuss options. The cmdlet for building a filternode layout is provided as an example.
Read the entire ‘How to Create a Trigger Alert for VMware Disabled Pools in ControlUp?’ thread below:
Hi guys, i want to create a vmware disabled pool trigger alert. in the scope of the euc environment i can only check all of the desktop pools. if i want to exclude some pools it would have to be in the filter editor? the most efficient way is to add the pools by HZ pool display name? thanks in advance 🙂
Yes you’d have to use the trigger filter to filter on desktop pool name.
Thanks for the reply Dennis. is there an easy way to add a list of 30 desktop pools names at once?
Not really unfortunately. There are a few options:
• If the names are similar, you could use regex.
• If the names are similar, you could use wild cards.
• You can export the trigger, edit the JSON generated and import it again.
• You can wait until the cmdlets to interact with triggers are released. But correct me if I’m wrong @member, you’d still need to edit the JSON?
If you want to get on a call to discuss options, let me know in a direct message
with the cmdlet you can supply a json with the -filternodes argument. This is an example from one of the tests I have created for these cmdlets add-cutrigger -triggername ATOM_Advanced_trigger -TriggerType Advanced -IncidentScheduleId ‘All days’ -AdvancedTriggerSettings @{TriggerStressRecordType=’Machine’} -FilterNodes @{LogicalOperator=’And’;IsNegation=$false;ExpressionDescriptor=@{Column=’sName’;Value=’dummy-trigger’;ComparisonOperator=’Equal’}},@{LogicalOperator=’And’;ExpressionDescriptor=@{Column=’CPUReady’;Value=2;ComparisonOperator=’GreaterThan’}},@{LogicalOperator=’And’;ExpressionDescriptor=@{Column=’CPU’;Value=75;ComparisonOperator=’GreaterThan’}},@{LogicalOperator=’And’;ExpressionDescriptor=@{Column=’iTotalRAM’;Value=6442450944;ComparisonOperator=’Equal’}}
the json for filternodes I think you can best build one first, export that one indeed and edit it
(this comes from our internal testing process which starts from python otherwise I would have preferred to build a proper powershell object first and convert that to json
this cmdlet gives the same layout as you see in the screenshot
Add-CUTrigger -TriggerName pools_disabled -TriggerType Advanced -IncidentScheduleId "All days" -AdvancedTriggerSettings @{TriggerStressRecordType=’Folder’} -FilterNodes @{"ExpressionDescriptor"=@{"Column"= "hzProvisioningEnabled";"Value"= "False";"ComparisonOperator"= "Equal";"IsRegex"= $false};"IsNegation"= $false;"LogicalOperator"= "And";"ChildNodes"= @()},@{"ExpressionDescriptor"= @{"Column"= "HZPoolDisplayName";"Value"= "P_*";"ComparisonOperator"= "Equal";"IsRegex"= $false};"IsNegation"= $true;"LogicalOperator"= "And";"ChildNodes"= @()},@{"ExpressionDescriptor"=$null;"IsNegation"= $false;"LogicalOperator"= "And";"ChildNodes"= @(@{"ExpressionDescriptor"= @{"Column"= "HZPoolDisplayName";"Value"= "name1";"ComparisonOperator"= "Equal";"IsRegex"= $false};"IsNegation"= $false;"LogicalOperator"= "And";"ChildNodes"= @()},@{"ExpressionDescriptor"= @{"Column"= "HZPoolDisplayName"; "Value"= "name2";"ComparisonOperator"= "Equal";"IsRegex"= $false};"IsNegation"= $false;"LogicalOperator"= "Or";"ChildNodes"= @()})}
working from hastbales etc is btw easier than json..
Continue reading and comment on the thread ‘How to Create a Trigger Alert for VMware Disabled Pools in ControlUp?’. Not a member? Join Here!
Categories: All Archives, ControlUp Scripts & Triggers