Hello! I would like to add a sensor to read value from file in local server.

I try with FILE CONTENT, but I can not add it (I need credentials). I do not know how to set up credentials.

I have txt file ( ht41.txt ) on raspberry pi 3 server. The file is locally accessible without any password on : http://192.168.5.101/Temp/ht41.txt and contains a temperature value: " 23.1 " in this txt file is only this three number...

How add this value to PRTG ?

Thankyou for help !


Article Comments

Hi!

The simplest way would be to use our "HTTP Content" Sensor. This sensor monitors a numerical value returned by an HTTP request. What you have to consider is that the returned value must be placed between square brackets, e.g. [23.1] instead of the plain value. Are you able to adjust the text file accordingly?

Please find more information about setting up the "HTTP Content" Sensor here: https://www.paessler.com/manuals/prtg/http_content_sensor


Oct, 2017 - Permalink

Hi ! I try with HTTP Content ( before i make test.txt file with square brackets ) and work. Is there another way ? My files have no square brackets, only float numbers... Is it possbile for me for duplicate all files with new one with brackets, but this is last solution

Thank you for help !

Damjan


Oct, 2017 - Permalink

Hi again,

I would suggest to create a simply PHP script that reads the values from the *.txt file and puts brackets around the value.

Please note that you need to change the URL to the PHP script instead of the adress of the txt file in the sensor's settings.

Best Regards
Andreas


Oct, 2017 - Permalink

Ok, thankyou....

this means... no go nowhere , without bracket :)

Regards !


Oct, 2017 - Permalink