This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Set Interface Thresholds with PowerShell?

Hello,

I'm trying to set thresholds on specific interfaces.

I am able to see the properties of the thresholds using Get-SwisObject.

$OutPercentUtilizationThreshold = Get-SwisObject $swis -Uri 'swis://orionserver.contoso.com/Orion/Orion.Nodes/NodeID=26/Interfaces/InterfaceID=270265/OutPercentUtilizationThreshold'

...but this set command is throwing a "Operation not supported on Orion.NPM.OutPercentUtilizationThreshold" error:

Set-SwisObject $swis -Uri 'swis://orionserver.contoso.com/Orion/Orion.Nodes/NodeID=26/Interfaces/InterfaceID=270265/OutPercentUtilizationThreshold' -Properties @{ Level1Value = 80 }

Is this a limitation of the SDK or am I doing something wrong?

Thanks!

  • Yes, SDK does not allow modifying the thresholds (at least for now)... You would need a Threshold URI to do so and all of those are null in the db. 
    That said, I was able to modify them in batch via SQL. If no custom threshold is configured on an item, you need to insert a row into the dbo.Thresholds Database.