Hello I try to run a script to see a folder exist or not but prtg return : incorrect response format. My script :
#!/bin/bash if [ -d /root/autofs_daemon/ ]; then echo "1:OK" else echo "0:BAD" fi
Modified on 2025-06-10 20:23:19 +0200
Hello I try to run a script to see a folder exist or not but prtg return : incorrect response format. My script :
#!/bin/bash if [ -d /root/autofs_daemon/ ]; then echo "1:OK" else echo "0:BAD" fi
Hello,
Thank you for your message.
The exit code is missing in the data returned to PRTG when comparing to the Custom Sensors manual, hence the message "incorrect response format". Therefore, I invite you to add 0: in each response returned as illustrated below:
In case you use the SSH Script Advanced the sensor, the format must be changed to XML/JSON as indicated here: https://www.paessler.com/manuals/prtg/custom_sensors#advanced_sensors.
If you have questions, do not hesitate.
Regards.
Apr, 2022 - Permalink