What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags

View all Tags

exe/script advance sensor - help!



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?

custom-script-exe nas prtg

Created on Oct 20, 2019 10:06:40 AM

2 Replies




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

Created on Oct 21, 2019 8:43:19 AM by  Timo Dambach [Paessler Support]



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!


Created on Oct 21, 2019 3:20:11 PM

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.