I have a Linux system, and I am continuously running a backup of my files to a external hard drive. One time, I encountered an error where my system can no longer copy files to my External HDD because it has lost its writing permission.
I know that there is no built-in sensor that could help me with this issue, and this is quite tricky.
I am thinking of a workaround where I will use SSH Disk free sensor to monitor the external HDD, and I want it to notify me if the disk space is not changing anymore. However, I can't find a way that PRTG will trigger a notification if this happens.
Any inputs will be appreciated.
Thanks
Article Comments
Wow, thank you a lot! That's exactly what I am looking for. Anyway, I'm sorry but I'm really not familiar with these scripts, may I know where exactly should I insert the path that I want to monitor in this script?
Thanks!
Dec, 2012 - Permalink
The path needs to be applied as a parameter in the sensor settings:
For testing purposes you can also add it as a commandline-parameter during execution, e. g. '/var/prtg/scripts/is_writable.sh /home/testuser'.
Dec, 2012 - Permalink
Thank you for your quick response. I have successfully created a script on my Linux and use it on my SSH Script sensor. It worked, however, it always says that the path is not writable even though I can write files in that path. I am using root as its SSH credentials. Are there any adjustments that needed to be done?
Dec, 2012 - Permalink
Maybe the paths for the 3 commands at the start of the script need to be adjusted to your system. Try to figure out which paths are correct on your system using 'which <command (touch|rm|grep)>' and modify the variables to the results.
Kind regards
Dec, 2012 - Permalink
Hi,
you can use our SSH Script-Sensor for this.
You have to create a script with the following content in the path /var/prtg/scripts/ on your Linux-Machine:
After making it executable you can add the ssh-script-sensor in PRTG and provide the path to check as parameter in the sensor settings. If the path is not writable you will be alerted with a down-state, if the path does not exist you will see a warning-state.
Kind regards
Dec, 2012 - Permalink