Hi Folks ,
I have a powershell script that tests an API by using a json packet. This script works 100% from my Desktop.
This script checks via the api and the JSON that a webservice is working , with the reposnse it gives back ie 0= successful and any other response is its down basically.
I am newish to Solarwinds so forgive me if use wrong words to describe solarwinds functions.
How do i
setup and run this powershell script so I can check the service is running, if the response is not 0 , it will send an alert on to our dashboard (by default) and email.
I have followed trying a application template but I am missing some stuff somwehere in solarwinds and my knowledge.
This is the powershell I call , it reads from a json file and the result comes back
The scripting stuff works great , but how do I get this to work in Solarwinds
powershell.exe -ExecutionPolicy Bypass -File "C:\Scripts\Send-FEM-Alert.ps1" "${N=SwisEntity;M=Node.Caption}" "${N=Alerting;M=AlertName}" "${N=Alerting;M=Severity}"
Access token retrieved successfully.
JSON payload read from file: C:\Scripts\test2.json
API call successful.