Hi there, would it be possible to mute alerts based on external schedules made available via API?
https://eskomsepush.gumroad.com/l/api
Looking to automatically mute alerts on nodes based on the planned power outage schedules.
Thanks
This should get you started
Yeah it's possiblesolarwinds.github.io/.../
#Edit this path for your environment. The odelistfile is a listf IP addresses c:\powershellscripts\nodelist.txt#Plave your orion server name where shown as YOURORIONSERVERCLSAdd-PSSnapin SwisSnapin$swis = Connect-Swis -host YOURORIONSERVER -Trusted$now =[DateTime]::Now$later =$now.AddMinutes(5)$entityUris = Get-SwisData $swis "SELECT Uri FROM Orion.Nodes WHERE IPAddress IN @IPAddress" @{IPAddress=(Get-Content c:\powershellscripts\nodelist.txt)}$entityUris = @( $entityUris | % {[string]$_} )Invoke-SwisVerb $swis Orion.AlertSuppression SuppressAlerts @($entityUris, $now, $later ) | Out-Null
Thanks @bobmarley will look into this.
Thanks @adam.beedell
Question, would this involve doing a GET for the API schedule then POST via SWIS to make the change?
Probably:
Auth to your apiGET schedule
Process data
Auth to Solarwinds
GET nodesPOST updated schedule