Is there is a better way to set a custom property based on a registry value?
Step 1 : SAM Windows PowerShell Monitor probes the registry and returns the registry value:
Write-Host "Message.RegValue: $($RegValue)"
Write-Host "Statistic.RegValue: 0"
Step 2 : Node Alert using SWQL to set custom property
SELECT Nodes.Uri, Nodes.DisplayName FROM Orion.Nodes AS Nodes
Where Nodes.Applications.Name = 'Custom Properties'
and Nodes.Applications.Components.Name = 'AssignmentGroup'
and Nodes.Applications.Components.MultipleStatisticData.Name = 'RegValue'
and Nodes.Applications.Components.MultipleStatisticData.StringData = 'ServerTeam'
and (
Nodes.CustomProperties.AssignmentGroup != 'Server Team'
or Nodes.CustomProperties.AssignmentGroup IS NULL
)
Thanks!