Hi,
I'm a newbie on PRTG and I'm trying to create a custom sensor that will monitor multiple Windows services on a remote server using one powershell script. The "test_service" is dynamically created by web-service which may have multiple instance (for example: "test_service", "test_service01", "test_service02"...)
Below is a simple PS script that will tell me the status of the "test_service" services.
-------SAMPLE SCRIPT-----------
$SvrName = 'rmt_host' get-service -computername $SvrName -displayname "*test_service*" | Foreach { if ($_.status -eq "stopped") {Write-Host $_ 'Service Not Running'} else {Write-Host $_ 'Service Running';Exit '1000'} }
------------------
At this point, I'm not sure how to proceed making this work in PRTG and hopefully someone can assist me or guide me to any documentations.
Thanks in advance.
Armin
Add comment