Hi Experts
Wondering if you could help.
We would like to use the new SolarWinds functionality for Volume Thresholds (ie. the thresholds you can now set via Edit Volume) to Override Orion General Thresholds.
Historically we have been using Volume-level Custom Property to specify both warning and critical threshold. This was allowing us to customise and set per-Volume thresholds easily.
The challenge we have now is how to migrate the threshold values from Custom Property, to the new Volume Thresholds. I can easily read the Custom Property values via PowerShell, but I'm having no luck setting up the new Thresholds.
I'm trying to use Set-SwisObject for that, but it appears that the new Volume Thresholds haven’t got Uri that would uniquely identify them.
My code and error I'm getting are below:
$query = 'SELECT V.Node.Caption AS [Node], V.Caption AS [Vol], V.CustomProperties.warning_marker AS [Warn], V.CustomProperties.Critical_marker AS [Crit], V.PercentDiskUsedThreshold.ThresholdType AS [ThresholdType], V.Uri FROM Orion.Volumes V WHERE V.VolumeID = 5944' $objVolume = $null $objVolume = Get-SwisData -SwisConnection $swis -Query $query foreach ($volume in $objVolume) { Set-SwisObject $swis -Uri ("{0}/PercentDiskUsedThreshold" -f $volume.Uri) @{ ThresholdType = 1 } }
But the error is:
Set-SwisObject : Operation not supported on Orion.PercentDiskUsedThreshold At C:\Scripts\SW_update_volumes\update-Volumes.ps1:46 char:2 + Set-SwisObject $swis -Uri ("{0}/PercentDiskUsedThreshold" -f $volume ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [Set-SwisObject], FaultException`1 + FullyQualifiedErrorId : SwisError,SwisPowerShell.SetSwisObject
I'm guessing this is not supported yet, and if so, is there any other way to achieve what we are trying?
Thanks