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

My *.Bat Sensor seems fine, but will not work.

Votes:

0

Hello! I've written a batch file which shall read the output from an *.exe file, manipulate this outputstring, and give it to my PRTG Sensor. When I test my batch-file in cmd it works fine, but when i load my PRTG Sensor the Sensor-output is never correct.

My Batch File:

@echo off
C:\"Program Files (x86)"\Cleware4.2.8\Example\USBtemp\Release\USBTemp.exe -b > temp.txt
set /p VAR=<temp.txt
set grm=%VAR%
set x=%grm:~22,5%
echo %x%:ok

My CMD output:
26.00

MY PRTG Output:
Last Message: 	
~22,5% echo %x%:ok 26.06:ok
Last Value:
**empty**

There's my problem. I tried a lot, but i can't figure out how to format the output of my Batch-File right. I'm really sorry for my bad english, it's not my native-language.

--bat batch prtg sensor

Created on Sep 26, 2012 8:14:11 AM

Last change on Sep 26, 2012 1:57:00 PM by  Torsten Lindner [Paessler Support]



3 Replies

Votes:

0

Hello,

can you please try it with:

@echo off
C:\"Program Files (x86)"\Cleware4.2.8\Example\USBtemp\Release\USBTemp.exe -b > temp.txt
set /p VAR=<temp.txt
set grm=%VAR%
set x=%grm%:~22,5
echo %x%:ok

My CMD output:
26.00

MY PRTG Output:
Last Message: 	
~22,5% echo %x%:ok 26.06:ok
Last Value:
**empty**

Created on Sep 26, 2012 2:07:15 PM by  Torsten Lindner [Paessler Support]



Votes:

0

Hi, i also have a Cleware USB Temp Sensor. How can i put it in PRTG ? This Code does not realy help. I want to get the temperature in my PRTG map.

Created on Apr 8, 2016 9:35:02 AM



Votes:

0

Hello Max-bfm,

you need to use this code with a Exe-Sensor in PRTG. Then you can put the sensor result on a map.

best regards.

Created on Apr 11, 2016 8:30:48 AM by  Torsten Lindner [Paessler Support]




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.