I have a custom sensor running a powershell script on my prtg server. The purpose of the script is to query a Hyper-V cluster for machine status since we do not have SCVVM.
The way it is written is that PRTG calls a runner script that starts another script that does the information gathering. The reason is that the second script can be updated without restarting prtg.
I have also written it so that only one query regarding one specific sensor gathers data from the cluster, it then stores information in a csv. All other sensors only checks this csv.
Manual runs of this script gives immediate results but when prtg runs it each query takes about 30 seconds and the cpu goes to 100%.
This results in constant alarms from the system health check.
Any advice on how to