New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


Custom script sensor storing value

Votes:

0

Your Vote:

Up

Down

I have a custom sensor that outputs this:

volume:1,222,333,444

Just for testing purposes. The script runs fine and the message shows up on the sensor screen, all lights are green.

However when i look at the live data table view the only data being stored is the execution time. The columns for "Value (volume)" and "Value (speed)" all say "0 Kbyte". I'd like to store that number in the volume column.

Any tips on what I need to look for in the sensor settings?

Thanks

batch-file custom-script-exe prtg

Created on Mar 1, 2016 7:07:36 PM by  dreniarb (10) 1



4 Replies

Votes:

0

Your Vote:

Up

Down

Dear dreniarb

Do you intent to store the numbers 1, 222, 333 and 444 (four data points in total), or the number 1222333444 as single integer?

Created on Mar 2, 2016 6:30:14 PM by  Arne Seifert [Paessler Support]



Votes:

0

Your Vote:

Up

Down

One single integer. It's the total file size of specific files in a folder. I've modified my batch file to remove the commas:

@echo off
for /f "tokens=3" %%A in ('dir \\blueirisw8\c$\BlueIris\New\%1*.*^|findstr "File(s)"') do set bytes=%%A
echo volume:%bytes:,=%

I don't know how to add code tags to these posts - sorry.

So "last message" now says:

48399208639

Instead of:

48,399,208,639

Everything is still green but nothing in the volume column.

Here's a screenshot of the sensor settings:

http://i.imgur.com/NDi4CNE.png

And here is the live data screen:

http://i.imgur.com/QBq5hne.png

I'm guessing "volume:48399208639" isn't the right output? I've also tried "kbyte:48399208639" but get the same results.

Created on Mar 2, 2016 7:44:19 PM by  dreniarb (10) 1

Last change on Oct 27, 2016 9:23:23 AM by  Luciano Lingnau [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Dear dreniarb

Please recreate the sensor and use "Integer" (instead of "Counter") as unit type. You should now get a non-zero value channel.

Created on Mar 3, 2016 10:32:19 AM by  Arne Seifert [Paessler Support]

Last change on Mar 3, 2016 11:33:14 AM by  Arne Seifert [Paessler Support]



Votes:

0

Your Vote:

Up

Down

That worked. Thanks.

Created on Mar 3, 2016 10:39:16 AM by  dreniarb (10) 1



Please log in or register to enter your reply.


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.