I hope this isn't too much of a daft question - I'm trying to monitor uptime of a western digital NAS, the only way I can think of to do this is will the custom exe/script sensor running on my core server, but I have no idea how to get the output I already have into a file/format that PRTG can monitor on. So far, my script calls putty to create an ssh connection and writes the uptime formatted into a text file containing just a single value. The value is simply HH:MM representing uptime of the device.

Obviously I can add this script to the folder that PRTG can pick up when I add a sensor, but how do I get PRTG to recognise the value generated?


Article Comments

Hello,

If you are looking to monitor the time your NAS is running you can use the SNMP System Uptime Sensor if the NAS supports SNMP.

The returned data for standard EXE/Script sensors must be in the following format: "value:message". You'll find more information on this at "Setup > PRTG API > Custom Sensors" in your PRTG Webinterface.

Kind Regards,
Timo Dambach
Paessler Tech Support


Oct, 2019 - Permalink

Sadly it doesn't support SNMP, that would be too easy...

It works now though - I installed Putty on the server and am running ssh through a batch file via Windows Task Scheduler to output the uptime to a text file every 5 minutes. I have created a custom sensor script to take that value and pass it to PRTG for those lovely graphs.

It means I can be alerted if the device unexpectedly reboots but isn't off for long enough to trigger a failure from the simple ping sensors, which was the goal.

The problem I was having is that running the putty SSH command in the PRTG custom sensor script was failing, doing that part separately solved it.

I do love this product!

Stuart


Oct, 2019 - Permalink