I created a custom batch script for monitoring a specific service on a webserver. It looks like this:
@echo off sc \\pjlm-s02 query "PAFMAlerting" | find "RUNNING" if "%ERRORLEVEL%"=="0" ( echo Service PAFMAlerting is running Exit 0 ) else ( echo Service is NOT running Exit 2 )
If I run this on any machine on the domain it recognizes the service running, but when I add this custom Sensor it always gives me Service is NOT running.
Any ideas why it would do this?
Add comment