SSH Script
Modified on 2025-06-10 16:03:28 +0200
Attention: This article is a record of a conversation with the Paessler support team. The information in this conversation is not updated to preserve the historical record. As a result, some of the information or recommendations in this conversation might be out of date.
Important: We no longer maintain this article. The information might be out of date.
Having an issue getting PRTG to see the script in /var/prtg/scripts/prtg.sh The scripts works if executed via putty over ssh, when adding the sensor it also connects, but the file is not listed in the selection drop like it would if it was for a windows box.
#!/bin/bash
cd /Storage/0747/Current
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
Article Comments
Disclaimer:
The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.