We are attempting to do a custom SSH script to an UNIX/AIX OS. However we are having issues getting the system to return a value PRTG can use for up and down.

here is the bat file PRTG calls to start the sensor: plink.exe -batch -ssh root@localhost -pw Password -m "c:\Path\To\Script\linux.txt"

here is the linux.txt commands: FILE=./UP_ALERT_DO-NOT-DELETE.txt if [ -f "$FILE" ] then echo "0:200:File System Found." # returncode 0 = put sensor in OK status else echo "4:500:File System Not Found." # returncode 4 = put sensor in DOWN status fi exit

However, PRTG doesn't see the echo response? Any help? Please note this is AIX and the native SSH sensors do not work on AIX OS.


Article Comments

Hello,

If you're asking PRTG to call the batch file, then you need to have the batch file output the return in the correct format PRTG expects.

Go to Setup -> PRTG API -> Custom Sensors. In there you'll see how we expect sensor output to look.

Basically, you should be able to execute the batch file manually, and it returns only the data for PRTG.

Does this make sense?

Benjamin Day
Paessler Support


Oct, 2019 - Permalink

Yes it does, I was hoping to have an automated via PRTG, I guess the other way would be to automated it via task scheduler and have PRTG look at the response.


Oct, 2019 - Permalink

Yes, that would work as well.

Benjamin Day
Paessler Support


Oct, 2019 - Permalink